Page MenuHomeFeedback Tracker

Callqueue is not cleared on Scenario Restart
Assigned, NormalPublic

Description

When restarting a scenario or transitioning to a new one, the Callqueue is not cleared.

Details

Severity
Minor
Resolution
Open
Reproducibility
Always
Operating System
Windows 10
Category
General
Steps To Reproduce
  1. Play some world in the Workbench.
  2. 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.

  1. 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.

Event Timeline

TilW created this task.Jun 22 2024, 7:24 PM
TilW renamed this task from Callqueue is not cleared on Scenario Change Transition to Callqueue is not cleared on Scenario Restart.Jun 22 2024, 8:13 PM
TilW updated the task description. (Show Details)
TilW edited Steps To Reproduce. (Show Details)
TilW edited Additional Information. (Show Details)
TilW edited Additional Information. (Show Details)
Geez changed the task status from New to Assigned.Jun 24 2024, 3:18 PM