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

@@ -1,4 +1,4 @@
using Robust.Shared.GameObjects;
using Robust.Shared.GameObjects;
using Robust.Shared.Maths;
namespace Content.Shared.Movement.Components
@@ -22,6 +22,12 @@ namespace Content.Shared.Movement.Components
/// </summary>
bool Sprinting { get; }
/// <summary>
/// Can the entity currently move. Avoids having to raise move-attempt events every time a player moves.
/// Note that this value will be overridden by the action blocker system, and shouldn't just be set directly.
/// </summary>
bool CanMove { get; set; }
Angle LastGridAngle { get; set; }
/// <summary>