Actors outside the world can't grant buildable area.

This commit is contained in:
Paul Chote
2014-03-18 15:28:00 +13:00
parent 972f3ae8dc
commit c01c5ff72d

View File

@@ -82,7 +82,7 @@ namespace OpenRA.Mods.RA.Buildings
{
var pos = new CPos(x, y);
var at = bi.GetBuildingAt(pos);
if (at == null || !at.HasTrait<GivesBuildableArea>())
if (at == null || !at.IsInWorld || !at.HasTrait<GivesBuildableArea>())
continue;
if (at.Owner == p || (allyBuildRadius && at.Owner.Stances[p] == Stance.Ally))