Don't reload after finishing a field.
This commit is contained in:
@@ -64,11 +64,12 @@ namespace OpenRA.Mods.Cnc.Activities
|
|||||||
if (IsCanceling)
|
if (IsCanceling)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
if ((minefield == null || minefield.Contains(self.Location)) && CanLayMine(self, self.Location))
|
||||||
|
{
|
||||||
if (rearmableInfo != null && ammoPools.Any(p => p.Info.Name == minelayer.Info.AmmoPoolName && !p.HasAmmo()))
|
if (rearmableInfo != null && ammoPools.Any(p => p.Info.Name == minelayer.Info.AmmoPoolName && !p.HasAmmo()))
|
||||||
{
|
{
|
||||||
// Rearm (and possibly repair) at rearm building, then back out here to refill the minefield some more
|
// Rearm (and possibly repair) at rearm building, then back out here to refill the minefield some more
|
||||||
rearmTarget = self.World.Actors.Where(a => self.Owner.Stances[a.Owner] == Stance.Ally
|
rearmTarget = self.World.Actors.Where(a => self.Owner.Stances[a.Owner] == Stance.Ally && rearmableInfo.RearmActors.Contains(a.Info.Name))
|
||||||
&& rearmableInfo.RearmActors.Contains(a.Info.Name))
|
|
||||||
.ClosestTo(self);
|
.ClosestTo(self);
|
||||||
|
|
||||||
if (rearmTarget == null)
|
if (rearmTarget == null)
|
||||||
@@ -82,8 +83,6 @@ namespace OpenRA.Mods.Cnc.Activities
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((minefield == null || minefield.Contains(self.Location)) && CanLayMine(self, self.Location))
|
|
||||||
{
|
|
||||||
LayMine(self);
|
LayMine(self);
|
||||||
QueueChild(new Wait(20)); // A little wait after placing each mine, for show
|
QueueChild(new Wait(20)); // A little wait after placing each mine, for show
|
||||||
minefield.Remove(self.Location);
|
minefield.Remove(self.Location);
|
||||||
|
|||||||
Reference in New Issue
Block a user