diff --git a/OpenRA.Mods.Cnc/Missions/Gdi01Script.cs b/OpenRA.Mods.Cnc/Missions/Gdi01Script.cs index 584519034a..f118e7e069 100644 --- a/OpenRA.Mods.Cnc/Missions/Gdi01Script.cs +++ b/OpenRA.Mods.Cnc/Missions/Gdi01Script.cs @@ -64,7 +64,30 @@ namespace OpenRA.Mods.RA Sound.StopMusic(); w.DisableTick = true; var player = Widget.RootWidget.OpenWindow("FMVPLAYER").GetWidget("PLAYER"); - player.Load("gunboat.vqa"); + player.Load("consyard.vqa"); + player.PlayThen(() => + { + Widget.RootWidget.CloseWindow(); + w.DisableTick = false; + Game.Disconnect(); + }); + })); + } + + public void OnLose(World w) + { + started = false; + Sound.PlayToPlayer(w.LocalPlayer, "fail1.aud"); + w.LocalPlayer.WinState = WinState.Lost; + + w.WorldActor.CancelActivity(); + w.WorldActor.QueueActivity(new Wait(125)); + w.WorldActor.QueueActivity(new CallFunc(() => + { + Sound.StopMusic(); + w.DisableTick = true; + var player = Widget.RootWidget.OpenWindow("FMVPLAYER").GetWidget("PLAYER"); + player.Load("gameover.vqa"); player.PlayThen(() => { Widget.RootWidget.CloseWindow(); @@ -96,7 +119,11 @@ namespace OpenRA.Mods.RA if (badcount == 0) OnVictory(self.World); - } + } + + //GoodGuy lose conditions + if (self.World.Queries.OwnedBy[Players["GoodGuy"]].Count( a => a.IsInWorld && !a.IsDead()) == 0) + OnLose(self.World); // GoodGuy reinforcements if (ticks == 25*5) diff --git a/mods/cnc/maps/gdi01/map.yaml b/mods/cnc/maps/gdi01/map.yaml index d00feb9a47..107d1d9b6a 100644 --- a/mods/cnc/maps/gdi01/map.yaml +++ b/mods/cnc/maps/gdi01/map.yaml @@ -2,7 +2,7 @@ Selectable: True MapFormat: 3 -Title: (null) +Title: Gdi 01 Description: Describe your map here