Callqueue.GetRemainsTime() (and GetRemainsTimeByName) is not reseting when you call Remove. It is continue to counting time for previous call (But will not call), and even after you call CallLater for same function it continue to counting and returns time for previous call, until previous call is reach 0.
Version: 1.2.0.102
Description
Description
Details
Details
- Severity
- None
- Resolution
- Open
- Reproducibility
- Always
- Operating System
- Windows 11 x64
- Operating System Version
- 22631.3880 (23H2)
- Category
- General
Steps To Reproduce
Simple example:
GetGame().GetCallqueue().CallLater(fn, delay: 300 * 1000); // After few seconds (Until it reach 0) t1 = GetGame().GetCallqueue().GetRemainingTime(fn); GetGame().GetCallqueue().Remove(fn); // After few seconds (Until it should reach 0 if Removed wasn't called) GetGame().GetCallqueue().CallLater(fn, delay: 300 * 1000); t2 = GetGame().GetCallqueue().GetRemainingTime(fn);
Results in t2 != 300 * 1000
Reproduction using entity component:
- Write component:
- Open any world and add it to the GameMode;
- Start world - it starts printing 0 remains until Finish()
- Execute (by Remote Console):
TAG_Component.GetInstance().Start(15);
It starts counting from 15 to 0
- Wait until 10 seconds left;
- Execute
TAG_Component.GetInstance().Stop();
It still counting...
- Wait until 5 seconds left;
- Execute:
TAG_Component.GetInstance().Start(10);
First, it counting from 5 to 0. When it reachs 0, it jumps to 4 and continue counting to 0. And only after this calls Finish()
Additional Information
Looks like by calling Remove you just set Removed flag inside Callqueue and not remove it actually, and GetRemainingTime not checked for this flag and returns time for this entry until it is timed out