move Nod01 to cnc-classic mod; fix FMV, music; avoid menu crash

This commit is contained in:
Matthias Mailänder
2013-02-07 16:08:37 +01:00
parent 20737415fa
commit 71b1cf9cb2
3 changed files with 10 additions and 37 deletions

View File

@@ -8,6 +8,7 @@
*/ */
#endregion #endregion
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Drawing; using System.Drawing;
using System.Linq; using System.Linq;
@@ -16,7 +17,6 @@ using OpenRA.Mods.Cnc;
using OpenRA.Mods.RA; using OpenRA.Mods.RA;
using OpenRA.Mods.RA.Move; using OpenRA.Mods.RA.Move;
using OpenRA.Mods.RA.Activities; using OpenRA.Mods.RA.Activities;
//using OpenRA.Mods.RA.Air;
using OpenRA.Network; using OpenRA.Network;
using OpenRA.Scripting; using OpenRA.Scripting;
using OpenRA.Traits; using OpenRA.Traits;
@@ -205,35 +205,12 @@ namespace OpenRA.Mods.Cnc.Missions
nr2 = actors["NODReinforceNthB"]; nr2 = actors["NODReinforceNthB"];
gr1 = actors["GDIReinforceNth"]; gr1 = actors["GDIReinforceNth"];
Game.MoveViewport(nr1.Location.ToFloat2()); Game.MoveViewport(nr1.Location.ToFloat2());
//Game.ConnectionStateChanged += StopMusic; Action afterFMV = () =>
//causes an exception atm
//Media.PlayFMVFullscreen(w, "nod1.vqa", () =>
//{
// Media.PlayFMVFullscreen(w, "landing.vqa", () =>
// {
// PlayMusic();
// });
//});
}
void PlayMusic()
{ {
if (!Rules.InstalledMusic.Any()) Sound.PlayMusic(Rules.Music["aoi"]);
{ };
return; Game.RunAfterDelay(0, () => Media.PlayFMVFullscreen(w, "nod1pre.vqa", () =>
} Media.PlayFMVFullscreen(w, "nod1.vqa", afterFMV)));
//somehow get this to play aoi, did it in the map.yaml
var track = Rules.InstalledMusic.Random(Game.CosmeticRandom);
Sound.PlayMusicThen(track.Value, PlayMusic);
}
void StopMusic(OrderManager orderManager)
{
if (!orderManager.GameStarted)
{
Sound.StopMusic();
Game.ConnectionStateChanged -= StopMusic;
}
} }
} }
} }

View File

@@ -2,9 +2,9 @@ Selectable: True
MapFormat: 5 MapFormat: 5
Title: NOD_01 Title: Nikoomba's Demise
Description: Recreation of first Nod mission from Cnc Description: Conversion of first Nod mission from Cnc
Author: Dan9550 Author: Dan9550
@@ -16,7 +16,7 @@ Bounds: 21,14,37,24
UseAsShellmap: False UseAsShellmap: False
Type: Mission Type: Campaign
Players: Players:
PlayerReference@Neutral: PlayerReference@Neutral:
@@ -285,11 +285,7 @@ Rules:
-CrateSpawner: -CrateSpawner:
-SpawnMPUnits: -SpawnMPUnits:
-MPStartLocations: -MPStartLocations:
PlayMusicOnMapLoad:
Music: aoi2
Nod01Script: Nod01Script:
MissionObjectivesPanel:
ObjectivesPanel: MISSION_OBJECTIVES
C10: C10:
Tooltip: Tooltip:
Name: Nikoomba Name: Nikoomba