When restarting a scenario or transitioning to a new one, the Callqueue is not cleared.
Description
Description
Details
Details
- Severity
- Minor
- Resolution
- Open
- Reproducibility
- Always
- Operating System
- Windows 10
- Category
- General
Steps To Reproduce
- Play some world in the Workbench.
- Paste this into the console and execute it:
GetGame().GetCallqueue().CallLater(Print, 20000, false, "test", LogLevel.NORMAL);
Using Print() in CallLater doesn't actually work properly because it only prints some "unknown variable" thing, but that doesn't matter here.
- Go into the Escape menu and restart the scenario. It will still appear in the log after 20 seconds.
Additional Information
This means that if you add something to the Callqueue, it will actually still be called after a world (re)load, which to my knowledge is never actually wanted.
This also affects GameStateTransitions::RequestScenarioChangeTransition(), which is called by game::PlayGameConfig().
In e. g. PlayGameConfig(), this could be avoided by calling GetGame().GetCallqueue().Clear() if the transition is successful.