MNLY immune to own mines

This commit is contained in:
Chris Forbes
2009-12-28 18:02:25 +13:00
parent 6a31fdef97
commit 3fa86b2542
3 changed files with 13 additions and 3 deletions

View File

@@ -16,6 +16,9 @@ namespace OpenRa.Game.Traits
public void OnCrush(Actor crusher)
{
if (crusher.traits.Contains<MineImmune>() && crusher.Owner == self.Owner)
return;
Game.world.AddFrameEndTask(_ =>
{
Game.world.Remove(self);
@@ -34,7 +37,11 @@ namespace OpenRa.Game.Traits
// Mines should explode indiscriminantly of player
switch (umt)
{
case UnitMovementType.Foot: return true;
case UnitMovementType.Foot:
case UnitMovementType.Wheel:
case UnitMovementType.Track:
return true;
default: return false;
}
}