Cache CanMove (#7480)

This commit is contained in:
Leon Friedrich
2022-04-10 16:48:11 +12:00
committed by GitHub
parent 4135d9813b
commit 87eede8785
26 changed files with 218 additions and 109 deletions

View File

@@ -26,6 +26,7 @@ namespace Content.Server.Buckle.Components
public sealed class BuckleComponent : SharedBuckleComponent
{
[Dependency] private readonly IEntityManager _entMan = default!;
[Dependency] private readonly IEntitySystemManager _sysMan = default!;
[Dependency] private readonly IGameTiming _gameTiming = default!;
[DataField("size")]
@@ -63,7 +64,8 @@ namespace Content.Server.Buckle.Components
{
_buckledTo = value;
_buckleTime = _gameTiming.CurTime;
Dirty();
_sysMan.GetEntitySystem<ActionBlockerSystem>().UpdateCanMove(Owner);
Dirty(_entMan);
}
}