Let docking angle be determined by the host building.

This commit is contained in:
tovl
2020-08-02 13:56:51 +02:00
committed by reaperrr
parent 2e8c85ff0b
commit 92189e4b50
13 changed files with 71 additions and 16 deletions

View File

@@ -111,9 +111,12 @@ namespace OpenRA.Mods.Common.Activities
if (ShouldLandAtBuilding(self, dest))
{
var exit = dest.FirstExitOrDefault();
var offset = exit != null ? exit.Info.SpawnOffset : WVec.Zero;
if (aircraft.Info.TurnToDock || !aircraft.Info.VTOL)
facing = aircraft.Info.InitialFacing;
var offset = WVec.Zero;
if (exit != null)
{
offset = exit.Info.SpawnOffset;
facing = exit.Info.Facing;
}
aircraft.MakeReservation(dest);
QueueChild(new Land(self, Target.FromActor(dest), offset, facing, Color.Green));