render in bridge code

This commit is contained in:
Chris Forbes
2010-01-19 10:22:09 +13:00
parent 77418f4227
commit 76a9e293b2
2 changed files with 22 additions and 16 deletions

View File

@@ -120,6 +120,7 @@ namespace OpenRa
public bool IsDead { get { return Health <= 0; } }
public bool IsInWorld { get; set; }
public bool RemoveOnDeath = true;
public DamageState GetDamageState()
{
@@ -145,7 +146,8 @@ namespace OpenRa
if (attacker.Owner != null)
attacker.Owner.Kills++;
Game.world.AddFrameEndTask(w => w.Remove(this));
if (RemoveOnDeath)
Game.world.AddFrameEndTask(w => w.Remove(this));
}
var maxHP = this.GetMaxHP();