Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
demoplayer: ignore suspend/resume requests when not initialized
This fixes a nasty interaction between the intro sequence and the demoplayer introduced in 3ff6204. The cutscene tries to suspend the demoplayer for its duration and then resume it later. When the suspension counter hits 0, the demoplayer event handlers are installed globally. And then AFTER that happens, the demoplayer is actually initialized, resetting the suspension counter and installing the event handlers AGAIN. When the demoplayer is then suspended (e.g. by starting the actual demo playback), only one set of those handlers is removed, which has the effect of the demoplayer remaining active even in-game. Eventually, it tries to play a demo while a game is already running, at which point all hell breaks loose. Fix this by making suspend and resume no-ops until the demoplayer has been properly initialized. Fixes #371
- Loading branch information