Fix crashing when transports are loaded via lua
This commit is contained in:
@@ -1221,7 +1221,10 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
Activity ICreationActivity.GetCreationActivity()
|
||||
{
|
||||
if (creationRallyPoint != null || creationActivityDelay > 0)
|
||||
return new AssociateWithAirfieldActivity(self, creationActivityDelay, creationRallyPoint);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
sealed class AssociateWithAirfieldActivity : Activity
|
||||
|
||||
@@ -1000,7 +1000,11 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
Activity ICreationActivity.GetCreationActivity()
|
||||
{
|
||||
return new LeaveProductionActivity(self, creationActivityDelay, creationRallypoint, returnToCellOnCreation ? new ReturnToCellActivity(self, creationActivityDelay, returnToCellOnCreationRecalculateSubCell) : null);
|
||||
if (returnToCellOnCreation || creationRallypoint != null || creationActivityDelay > 0)
|
||||
return new LeaveProductionActivity(self, creationActivityDelay, creationRallypoint,
|
||||
returnToCellOnCreation ? new ReturnToCellActivity(self, creationActivityDelay, returnToCellOnCreationRecalculateSubCell) : null);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
sealed class MoveOrderTargeter : IOrderTargeter
|
||||
|
||||
Reference in New Issue
Block a user