diff --git a/OpenRA.Game/Widgets/VqaPlayerWidget.cs b/OpenRA.Game/Widgets/VqaPlayerWidget.cs index 48812b7642..25b233f730 100644 --- a/OpenRA.Game/Widgets/VqaPlayerWidget.cs +++ b/OpenRA.Game/Widgets/VqaPlayerWidget.cs @@ -27,6 +27,8 @@ namespace OpenRA.Widgets bool stopped; bool paused; + Action OnComplete; + public bool Paused { get { return paused; } } public bool DrawOverlay = true; @@ -38,7 +40,8 @@ namespace OpenRA.Widgets stopped = true; paused = true; Sound.StopVideo(); - + OnComplete = () => {}; + cachedVideo = filename; video = new VqaReader(FileSystem.Open(filename)); @@ -95,10 +98,16 @@ namespace OpenRA.Widgets } public void Play() + { + PlayThen(() => {}); + } + + public void PlayThen(Action after) { if (video == null) return; + OnComplete = after; if (stopped) Sound.PlayVideo(video.AudioData); else @@ -126,6 +135,7 @@ namespace OpenRA.Widgets Sound.StopVideo(); video.Reset(); videoSprite.sheet.Texture.SetData(video.FrameData); + OnComplete(); } } } diff --git a/OpenRA.Game/World.cs b/OpenRA.Game/World.cs index 899f45411f..874e0d027b 100644 --- a/OpenRA.Game/World.cs +++ b/OpenRA.Game/World.cs @@ -149,8 +149,13 @@ namespace OpenRA public event Action ActorAdded = _ => { }; public event Action ActorRemoved = _ => { }; + // Will do bad things in multiplayer games + public bool DisableTick = false; public void Tick() { + if (DisableTick) + return; + Timer.Time("----World Tick"); actors.DoTimed( x => x.Tick(), "expensive actor tick: {0} ({1:0.000})", 0.001 ); diff --git a/mods/cnc/chrome/ingame.yaml b/mods/cnc/chrome/ingame.yaml index 5fde745f6f..3e71af1880 100644 --- a/mods/cnc/chrome/ingame.yaml +++ b/mods/cnc/chrome/ingame.yaml @@ -256,4 +256,16 @@ Container@ROOT: Y:200 Width:PARENT_RIGHT - 30 Height:20 - Text:Instant Charge Time (Special Powers) \ No newline at end of file + Text:Instant Charge Time (Special Powers) + Background@FMVPLAYER: + Id:FMVPLAYER + Width:WINDOW_RIGHT + Height:WINDOW_BOTTOM + Visible: false + Children: + VqaPlayer: + Id:PLAYER + X:(WINDOW_RIGHT - WIDTH)/2 + Y:(WINDOW_BOTTOM - HEIGHT)/2 + Width:640 + Height:400 \ No newline at end of file