Change IFacing.TurnSpeed to WAngle.

This commit is contained in:
Paul Chote
2020-06-03 18:01:15 +01:00
committed by teinarss
parent 6adf45bcb4
commit 803b930405
8 changed files with 18 additions and 18 deletions

View File

@@ -215,8 +215,8 @@ namespace OpenRA.Mods.Common.Traits
public WPos CenterPosition { get; private set; }
public CPos TopLeft { get { return self.World.Map.CellContaining(CenterPosition); } }
public int TurnSpeed { get { return !IsTraitDisabled && !IsTraitPaused ? 4 * Info.TurnSpeed : 0; } }
public int IdleTurnSpeed { get { return Info.IdleTurnSpeed != -1 ? 4 * Info.IdleTurnSpeed : -1; } }
public WAngle TurnSpeed { get { return !IsTraitDisabled && !IsTraitPaused ? new WAngle(4 * Info.TurnSpeed) : WAngle.Zero; } }
public WAngle? IdleTurnSpeed { get { return Info.IdleTurnSpeed != -1 ? new WAngle(4 * Info.IdleTurnSpeed) : (WAngle?)null; } }
public Actor ReservedActor { get; private set; }
public bool MayYieldReservation { get; private set; }

View File

@@ -71,7 +71,7 @@ namespace OpenRA.Mods.Common.Traits
[Sync]
public WAngle Facing { get; set; }
public int TurnSpeed { get { return 0; } }
public WAngle TurnSpeed { get { return WAngle.Zero; } }
public Husk(ActorInitializer init, HuskInfo info)
{

View File

@@ -222,7 +222,7 @@ namespace OpenRA.Mods.Common.Traits
set { facing = value; }
}
public int TurnSpeed { get { return 4 * Info.TurnSpeed; } }
public WAngle TurnSpeed { get { return new WAngle(4 * Info.TurnSpeed); } }
#endregion
[Sync]