Fix #225 and some other uses of a.IsInWorld / a.IsDead()

This commit is contained in:
Paul Chote
2010-10-08 10:28:09 +13:00
parent ad6481c8e8
commit fd34f2ba99
8 changed files with 20 additions and 9 deletions

View File

@@ -140,6 +140,8 @@ namespace OpenRA.Traits
{
public static bool IsDead(this Actor self)
{
if (self.Destroyed) return true;
var health = self.TraitOrDefault<Health>();
return (health == null) ? true : health.IsDead;
}