Fix queued deletion error log (#3982)

This commit is contained in:
Leon Friedrich
2023-05-01 16:11:51 +12:00
committed by GitHub
parent 381c856dd4
commit b8081a335a
2 changed files with 12 additions and 1 deletions

View File

@@ -72,8 +72,12 @@ namespace Robust.Client.GameObjects
return;
}
if (ShuttingDown)
return;
// Client-side entity deletion is not supported and will cause errors.
Logger.Error($"Predicting the queued deletion of a networked entity: {ToPrettyString(uid)}. Trace: {Environment.StackTrace}");
if (_client.RunLevel == ClientRunLevel.Connected || _client.RunLevel == ClientRunLevel.InGame)
Logger.Error($"Predicting the queued deletion of a networked entity: {ToPrettyString(uid)}. Trace: {Environment.StackTrace}");
}
/// <inheritdoc />