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())) var unitsAndBuildings = world.Actors.Where(a => !a.IsDead() && a.IsInWorld && (a.HasTrait<Mobile>() || (a.HasTrait<Building>() && !a.HasTrait<Wall>())));
{
Action afterFMV = () => if (!unitsAndBuildings.Any(a => a.Owner == nod))
{ {
Sound.StopMusic(); Action afterFMV = () =>
MissionFailed("The Nod forces in the area have been wiped out."); {
}; Sound.StopMusic();
MissionFailed("The Nod forces in the area have been wiped out.");
};
Game.RunAfterDelay(0, () => Media.PlayFMVFullscreen(world, "nodlose.vqa", afterFMV)); Game.RunAfterDelay(0, () => Media.PlayFMVFullscreen(world, "nodlose.vqa", afterFMV));
} }
} }