Fix deploying a mine on a mine making the game explode
This commit is contained in:
@@ -15,6 +15,10 @@ namespace OpenRa.Game.Traits
|
|||||||
if (limitedAmmo != null && !limitedAmmo.HasAmmo())
|
if (limitedAmmo != null && !limitedAmmo.HasAmmo())
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
|
// Ensure that the cell is empty except for the minelayer
|
||||||
|
if (Game.UnitInfluence.GetUnitsAt( xy ).Any(a => a != self))
|
||||||
|
return null;
|
||||||
|
|
||||||
if (mi.Button == MouseButton.Right && underCursor == self)
|
if (mi.Button == MouseButton.Right && underCursor == self)
|
||||||
return new Order("Deploy", self, null, int2.Zero, null);
|
return new Order("Deploy", self, null, int2.Zero, null);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user