fixes dumb WEAP roof

This commit is contained in:
Chris Forbes
2009-11-17 21:34:21 +13:00
parent 93403ca6fd
commit d05c9ca0de

View File

@@ -43,9 +43,7 @@ namespace OpenRa.Game.Traits
roof.Tick();
var b = self.Bounds;
if (isOpen && !Game.SelectUnitsInBox(
new float2(b.Left, b.Top),
new float2(b.Right, b.Bottom)).Any(a => a.traits.Contains<Mobile>()))
if (isOpen && null == Game.UnitInfluence.GetUnitAt(((1/24f) * self.CenterLocation).ToInt2()))
{
isOpen = false;
roof.PlayBackwardsThen(prefix + "build-top", () => roof.Play(prefix + "idle-top"));