bullets, missiles are all altitude-aware

This commit is contained in:
Chris Forbes
2009-12-22 22:58:42 +13:00
parent cabdb40147
commit 91a04dc96a
8 changed files with 37 additions and 18 deletions

View File

@@ -14,9 +14,13 @@ namespace OpenRa.Game.Traits
{
if (self.IsDead)
{
var unit = self.traits.GetOrDefault<Unit>();
var altitude = unit != null ? unit.Altitude : 0;
Game.world.AddFrameEndTask(
w => w.Add(new Bullet("UnitExplode", e.Attacker.Owner, e.Attacker,
self.CenterLocation.ToInt2(), self.CenterLocation.ToInt2())));
self.CenterLocation.ToInt2(), self.CenterLocation.ToInt2(),
altitude, altitude)));
}
}
}