Fix replay spectating bugs (#21573)

This commit is contained in:
Leon Friedrich
2023-11-11 17:45:46 +11:00
committed by GitHub
parent a0198f4618
commit 9af95742df
7 changed files with 83 additions and 47 deletions

View File

@@ -647,7 +647,9 @@ public abstract class SharedActionsSystem : EntitySystem
if (action.AttachedEntity != performer)
{
DebugTools.Assert(!Resolve(performer, ref comp, false) || !comp.Actions.Contains(actionId.Value));
DebugTools.Assert(!Resolve(performer, ref comp, false)
|| comp.LifeStage >= ComponentLifeStage.Stopping
|| !comp.Actions.Contains(actionId.Value));
if (!GameTiming.ApplyingState)
Log.Error($"Attempted to remove an action {ToPrettyString(actionId)} from an entity that it was never attached to: {ToPrettyString(performer)}");