Try fix some mover jank (#13503)

This commit is contained in:
Leon Friedrich
2023-01-16 21:20:22 +13:00
committed by GitHub
parent 450dfd5074
commit 4b65fb1579
6 changed files with 79 additions and 68 deletions

View File

@@ -44,6 +44,7 @@ public abstract partial class SharedMoverController
component.RelayEntity = relayEntity;
targetComp = EnsureComp<MovementRelayTargetComponent>(relayEntity);
targetComp.Entities.Add(uid);
DebugTools.Assert(targetComp.Entities.Count <= 1, "Multiple relayed movers are not supported at the moment");
Dirty(component);
Dirty(targetComp);
}
@@ -114,6 +115,7 @@ public abstract partial class SharedMoverController
component.Entities.Clear();
component.Entities.AddRange(state.Entities);
DebugTools.Assert(component.Entities.Count <= 1, "Multiple relayed movers are not supported at the moment");
}
private void OnTargetRelayGetState(EntityUid uid, MovementRelayTargetComponent component, ref ComponentGetState args)