Merge pull request #10628 from teees/upgradeactorsnear-fix

Don't grant upgrades to newly built units while disabled
This commit is contained in:
Matthias Mailänder
2016-01-28 15:15:23 +01:00

View File

@@ -107,6 +107,10 @@ namespace OpenRA.Mods.Common.Traits
if (produced.OccupiesSpace == null)
return;
// We don't grant upgrades when disabled
if (self.IsDisabled())
return;
// Work around for actors produced within the region not triggering until the second tick
if ((produced.CenterPosition - self.CenterPosition).HorizontalLengthSquared <= info.Range.LengthSquared)
{