Kill the allied players if they fail the mission. Also fail the mission if the Allies2 player loses all of their buildings.

This commit is contained in:
Scott_NZ
2012-08-14 00:03:23 +12:00
parent 245de3abcb
commit cce12e781f
2 changed files with 14 additions and 2 deletions

View File

@@ -80,6 +80,10 @@ namespace OpenRA.Mods.RA.Missions
return;
}
allies.WinState = WinState.Lost;
foreach (var actor in world.Actors.Where(a => a.IsInWorld && a.Owner == allies && !a.IsDead()))
{
actor.Kill(actor);
}
Game.AddChatLine(Color.Red, "Mission failed", text);
Sound.Play("misnlst1.aud");
}