MovementSpeedModifierComponent (#721)
* movement modifier system * update default exposedata values * changing base speed marks as dirty * formatting * movement speed modifier component * Moves slowdown component to the prototype AIController respects slowdown * reset dirty flag
This commit is contained in:
@@ -32,8 +32,8 @@ namespace Content.Server.GameObjects.Components.Movement
|
||||
public override string Name => "ShuttleController";
|
||||
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
public float WalkMoveSpeed { get; set; } = 8;
|
||||
public float SprintMoveSpeed { get; set; }
|
||||
public float CurrentWalkSpeed { get; set; } = 8;
|
||||
public float CurrentSprintSpeed { get; set; }
|
||||
public bool Sprinting { get; set; }
|
||||
public Vector2 VelocityDir { get; } = Vector2.Zero;
|
||||
public GridCoordinates LastPosition { get; set; }
|
||||
@@ -61,7 +61,7 @@ namespace Content.Server.GameObjects.Components.Movement
|
||||
collideComp.PhysicsShapes.Add(new PhysShapeGrid(grid));
|
||||
}
|
||||
|
||||
physComp.LinearVelocity = CalcNewVelocity(direction, enabled) * WalkMoveSpeed;
|
||||
physComp.LinearVelocity = CalcNewVelocity(direction, enabled) * CurrentWalkSpeed;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user