From 0657abd51b0804171aa7a150ea87e7ffec6d6499 Mon Sep 17 00:00:00 2001 From: Dan9550 <56kflyingtoaster@gmail.com> Date: Fri, 26 Jul 2013 06:25:35 +1000 Subject: [PATCH] Fixed nod01, not being able to lose mission --- OpenRA.Mods.Cnc/Missions/Nod01Script.cs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/OpenRA.Mods.Cnc/Missions/Nod01Script.cs b/OpenRA.Mods.Cnc/Missions/Nod01Script.cs index 15518925e9..0fa3cfaa12 100644 --- a/OpenRA.Mods.Cnc/Missions/Nod01Script.cs +++ b/OpenRA.Mods.Cnc/Missions/Nod01Script.cs @@ -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() || (a.HasTrait() && !a.HasTrait()))); + + 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)); } }