Convert IFacing.Facing and TurnSpeed to WAngle.
This commit is contained in:
@@ -69,7 +69,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
public WPos CenterPosition { get; private set; }
|
||||
|
||||
[Sync]
|
||||
public int Facing { get; set; }
|
||||
public WAngle Facing { get; set; }
|
||||
|
||||
public int TurnSpeed { get { return 0; } }
|
||||
|
||||
@@ -80,7 +80,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
TopLeft = init.GetValue<LocationInit, CPos>(info);
|
||||
CenterPosition = init.GetValue<CenterPositionInit, WPos>(info, init.World.Map.CenterOfCell(TopLeft));
|
||||
Facing = init.GetValue<FacingInit, int>(info, 128);
|
||||
Facing = WAngle.FromFacing(init.GetValue<FacingInit, int>(info, 128));
|
||||
|
||||
dragSpeed = init.GetValue<HuskSpeedInit, int>(info, 0);
|
||||
finalPosition = init.World.Map.CenterOfCell(TopLeft);
|
||||
@@ -163,7 +163,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
void IDeathActorInitModifier.ModifyDeathActorInit(Actor self, TypeDictionary init)
|
||||
{
|
||||
init.Add(new FacingInit(Facing));
|
||||
init.Add(new FacingInit(Facing.Facing));
|
||||
}
|
||||
|
||||
// We return self.Owner if there's no effective owner
|
||||
|
||||
Reference in New Issue
Block a user