Convert Aircraft.Facing to WAngle.

This commit is contained in:
Paul Chote
2020-05-30 22:39:50 +01:00
committed by reaperrr
parent 7a78c37851
commit 6d6b21a0eb
11 changed files with 80 additions and 48 deletions

View File

@@ -26,7 +26,7 @@ namespace OpenRA.Mods.Common.Activities
readonly Rearmable rearmable;
readonly bool alwaysLand;
Actor dest;
int facing = -1;
WAngle? facing;
public ReturnToBase(Actor self, Actor dest = null, bool alwaysLand = false)
{
@@ -114,7 +114,7 @@ namespace OpenRA.Mods.Common.Activities
var exit = dest.FirstExitOrDefault();
var offset = exit != null ? exit.Info.SpawnOffset : WVec.Zero;
if (aircraft.Info.TurnToDock || !aircraft.Info.VTOL)
facing = aircraft.Info.InitialFacing;
facing = WAngle.FromFacing(aircraft.Info.InitialFacing);
aircraft.MakeReservation(dest);
QueueChild(new Land(self, Target.FromActor(dest), offset, facing, Color.Green));