Convert (Dynamic)FacingInit, (Dynamic)TurretFacingInit to WAngle.

This commit is contained in:
Paul Chote
2020-06-26 00:33:08 +01:00
committed by abcdefg30
parent e8f443f4a9
commit a2269e7ee7
36 changed files with 133 additions and 155 deletions

View File

@@ -76,7 +76,7 @@ namespace OpenRA.Mods.Common.Traits
{
new CenterPositionInit(w.Map.CenterOfCell(startPos) + new WVec(WDist.Zero, WDist.Zero, altitude)),
new OwnerInit(owner),
new FacingInit(64)
new FacingInit(new WAngle(256)),
});
actor.QueueActivity(new Fly(actor, Target.FromCell(w, dropPos)));
@@ -124,7 +124,7 @@ namespace OpenRA.Mods.Common.Traits
var spawn = self.World.Map.CenterOfCell(exit) + new WVec(WDist.Zero, WDist.Zero, altitude);
var to = self.World.Map.CenterOfCell(exit);
var initialFacing = exitinfo == null || exitinfo.Facing < 0 ? (to - spawn).Yaw.Facing : exitinfo.Facing;
var initialFacing = exitinfo == null || exitinfo.Facing < 0 ? (to - spawn).Yaw : WAngle.FromFacing(exitinfo.Facing);
exitLocations = rp.Value != null && rp.Value.Path.Count > 0 ? rp.Value.Path : new List<CPos> { exit };