Don't override spawn CenterPosition for non-aircraft reinforcements.

This commit is contained in:
Paul Chote
2019-10-19 17:50:04 +01:00
committed by abcdefg30
parent fdd3bffa1d
commit 252c833320

View File

@@ -47,9 +47,11 @@ namespace OpenRA.Mods.Common.Scripting
if (entryLocation.HasValue)
{
var pi = ai.TraitInfoOrDefault<AircraftInfo>();
initDict.Add(new CenterPositionInit(owner.World.Map.CenterOfCell(entryLocation.Value) + new WVec(0, 0, pi != null ? pi.CruiseAltitude.Length : 0)));
initDict.Add(new LocationInit(entryLocation.Value));
var pi = ai.TraitInfoOrDefault<AircraftInfo>();
if (pi != null)
initDict.Add(new CenterPositionInit(owner.World.Map.CenterOfCell(entryLocation.Value) + new WVec(0, 0, pi.CruiseAltitude.Length)));
}
if (entryLocation.HasValue && nextLocation.HasValue)