English Round Ending Delay

2 replies
Goto Page
To the start Previous 1 Next To the start
30.05.21 11:18:18 pm
Up
Mami Tomoe
User
Offline Off
Is this the right amount of time it takes for each round ending type to actually end the round? (Between the cs2d lua hook endround beign called and the round actually ending.)

Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
TERRORIST WIN               = 5 
COUNTER TERRORIST WIN          = 5 
DRAW                         = 5 
GAME COMMENCING               = 3 
RESTART                         = 0
VIP KILLED                    = 5 
VIP ESCAPED                    = 5 
VIP DID NOT ESCAPE               = 5 
BOMB DETONATED               = 5 
BOMB DEFUSED                    = 5 
BOMBSITE PROTECTED          = 5 
HOSTAGES PROTECTED          = 5 
HOSTAGES RESCUED               = 5 
BLUE FLAG CAPTURED          = 5 
RED FLAG CAPTURED               = 5 
ALL POINTS DOMINATED BY T     = 5 
ALL POINTS DOMINATED BY CT     = 5 
ALL HUMANS KILLED               = 5 
SURVIVORS SURVIVED          = 5

In seconds.

I need exact precision, thank you.

EDIT:
I also suspect that some of those may have varying time, mostly the game commencing one, but the round draw is also suspicious.

I'm trying to create an artifical cs2d lua hook post_endround hook, for that I need the exact time it takes for a round to end, so I can call my function just before the round initialises.

Thank you!
edited 1×, last 01.06.21 04:07:43 am
fish
01.06.21 06:21:55 pm
Up
DC
Admin
Offline Off
Sorry but the delay is sometimes 3 and sometimes 5 seconds even for the same round restart type.

Also there is cs2d cmd restartround and cs2d entity func_gameaction which both can trigger restarts with custom delays.

To make things even worse: Even when using the right timings your plan might not work properly. It depends on how/when CS2D checks Lua timers and the round system timers. It may happen that your timer gets called after the round was restarted.

I added the ideas for a "post_endround"-hook and an additional parameter (restart delay) for cs2d lua hook endround to my todo list. Can't promise that this will be added any time soon.
www.UnrealSoftware.de | www.CS2D.com | www.CarnageContest.com | Use the forum & avoid PMs!
01.06.21 07:19:16 pm
Up
Mami Tomoe
User
Offline Off
@user DC: The cs2d cmd restart command's delay doesn't actually call the cs2d cmd endround hook, it will only call it once the round was restarted (when timer is over).
I would suppose the trigger does the same thing (but I don't really care since I don't use it).

I plan to call the function about 10 milliseconds prior to the time when the round ends.

Thanks for adding the new hook though.
I also hope you'll fix the ordering in the bug report I previously mentioned...
fish
To the start Previous 1 Next To the start