Don't grant upgrades to newly built units while disabled

This commit is contained in:
teees
2016-01-28 10:42:02 +01:00
parent 2f2d7e1083
commit 8315350f07

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)
{