Fix crash on fmv completion

This commit is contained in:
Paul Chote
2010-10-15 00:03:15 +13:00
parent 185ba80e99
commit 2a02df9411
3 changed files with 24 additions and 15 deletions

View File

@@ -23,15 +23,14 @@ namespace OpenRA.Scripting
{
public static void PlayFMVFullscreen(World w, string movie, Action onComplete)
{
var playerRoot = Widget.OpenWindow("FMVPLAYER");
var playerRoot = w.OpenWindow("FMVPLAYER");
var player = playerRoot.GetWidget<VqaPlayerWidget>("PLAYER");
w.DisableTick = true;
Console.WriteLine("PlayFMV {0}",movie);
player.Load(movie);
// Mute world sounds
var oldModifier = Sound.SoundVolumeModifier;
// Todo: this also modifies vqa audio
//Sound.SoundVolumeModifier = 0f;
// Stop music while fmv plays