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

@@ -126,7 +126,7 @@ namespace OpenRA.Mods.RA
}
// GoodGuy win conditions
// BadGuy is dead
int badcount = self.World.Queries.OwnedBy[Players["BadGuy"]].Count(a => a.IsInWorld && !a.IsDead());
int badcount = self.World.Queries.OwnedBy[Players["BadGuy"]].Count(a => !a.IsDead());
if (badcount != lastBadCount)
{
Game.Debug("{0} badguys remain".F(badcount));
@@ -137,7 +137,7 @@ namespace OpenRA.Mods.RA
}
//GoodGuy lose conditions
if (self.World.Queries.OwnedBy[Players["GoodGuy"]].Count( a => a.IsInWorld && !a.IsDead()) == 0)
if (self.World.Queries.OwnedBy[Players["GoodGuy"]].Count( a => !a.IsDead()) == 0)
OnLose(self.World);
// GoodGuy reinforcements