Fix units from transports appearing at load point.
This commit is contained in:
@@ -73,6 +73,8 @@ namespace OpenRA.Mods.Common.Traits
|
||||
td.Add(new LocationInit(exit));
|
||||
td.Add(new CenterPositionInit(spawn));
|
||||
td.Add(new FacingInit(initialFacing));
|
||||
if (exitinfo != null)
|
||||
td.Add(new MoveIntoWorldDelayInit(exitinfo.ExitDelay));
|
||||
}
|
||||
|
||||
self.World.AddFrameEndTask(w =>
|
||||
@@ -81,16 +83,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
var move = newUnit.TraitOrDefault<IMove>();
|
||||
if (exitinfo != null && move != null)
|
||||
{
|
||||
if (exitinfo.MoveIntoWorld)
|
||||
{
|
||||
if (exitinfo.ExitDelay > 0)
|
||||
newUnit.QueueActivity(new Wait(exitinfo.ExitDelay, false));
|
||||
|
||||
newUnit.QueueActivity(move.MoveIntoWorld(newUnit, exit));
|
||||
newUnit.QueueActivity(new AttackMoveActivity(newUnit, () => move.MoveTo(exitLocation, 1, targetLineColor: Color.OrangeRed)));
|
||||
}
|
||||
}
|
||||
newUnit.QueueActivity(new AttackMoveActivity(newUnit, () => move.MoveTo(exitLocation, 1, targetLineColor: Color.OrangeRed)));
|
||||
|
||||
if (!self.IsDead)
|
||||
foreach (var t in self.TraitsImplementing<INotifyProduction>())
|
||||
|
||||
Reference in New Issue
Block a user