Page MenuHomeFeedback Tracker

Callqueue GetRemainsTime is not reseted when Remove called
Awaiting internal Testing, NormalPublic

Description

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

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:

  1. Write component:

  1. Open any world and add it to the GameMode;
  2. Start world - it starts printing 0 remains until Finish()
  3. Execute (by Remote Console):
TAG_Component.GetInstance().Start(15);

It starts counting from 15 to 0

  1. Wait until 10 seconds left;
  2. Execute
TAG_Component.GetInstance().Stop();

It still counting...

  1. Wait until 5 seconds left;
  2. 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

Event Timeline

vlad333000 edited Additional Information. (Show Details)
vlad333000 edited Additional Information. (Show Details)Aug 3 2024, 2:20 PM
vlad333000 edited Steps To Reproduce. (Show Details)
Geez changed the task status from New to Awaiting internal Testing.Aug 5 2024, 2:54 PM