Fixed nod01, not being able to lose mission

This commit is contained in:
Dan9550
2013-07-26 06:25:35 +10:00
parent b75ad65493
commit 0657abd51b

View File

@@ -121,13 +121,15 @@ namespace OpenRA.Mods.Cnc.Missions
}
}
if (!world.Actors.Any(a => (a.Owner == nod) && a.IsInWorld && !a.IsDead()))
{
Action afterFMV = () =>
{
Sound.StopMusic();
MissionFailed("The Nod forces in the area have been wiped out.");
};
var unitsAndBuildings = world.Actors.Where(a => !a.IsDead() && a.IsInWorld && (a.HasTrait<Mobile>() || (a.HasTrait<Building>() && !a.HasTrait<Wall>())));
if (!unitsAndBuildings.Any(a => a.Owner == nod))
{
Action afterFMV = () =>
{
Sound.StopMusic();
MissionFailed("The Nod forces in the area have been wiped out.");
};
Game.RunAfterDelay(0, () => Media.PlayFMVFullscreen(world, "nodlose.vqa", afterFMV));
}
}