Convert yaml-exposed facings to WAngle.

This commit is contained in:
Paul Chote
2020-07-09 22:08:38 +01:00
committed by reaperrr
parent 6d12301f88
commit ac975f4139
80 changed files with 477 additions and 370 deletions

View File

@@ -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 : WAngle.FromFacing(exitinfo.Facing);
var initialFacing = (exitinfo != null && exitinfo.Facing.HasValue) ? exitinfo.Facing.Value : (to - spawn).Yaw;
exitLocations = rp.Value != null && rp.Value.Path.Count > 0 ? rp.Value.Path : new List<CPos> { exit };