Cache trait look-ups in the constructor where possible for Air activities/traits
This commit is contained in:
@@ -40,7 +40,7 @@ namespace OpenRA.Mods.Common.Activities
|
||||
// If all ammo pools are depleted and none reload automatically, return to helipad to reload and then move to next activity
|
||||
// TODO: This should check whether there is ammo left that is actually suitable for the target
|
||||
if (ammoPools != null && ammoPools.All(x => !x.Info.SelfReloads && !x.HasAmmo()))
|
||||
return Util.SequenceActivities(new HeliReturn(), NextActivity);
|
||||
return Util.SequenceActivities(new HeliReturn(self), NextActivity);
|
||||
|
||||
var dist = target.CenterPosition - self.CenterPosition;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user