Added 2 comments that speaks for them self's, and 2 additional checks for the second loop as I had triggered several cases where it would loop indefinitely still, as we break out of the parallel loop and continue into the old school loop for the remainder of the outSeqNr - currentIndex frames. This should fix all problems related to this function. After numerous of tests with varying arbitrary outSeqNr values that were vastly larger than the current packet flow index, the bug was no longer triggered. A similar test had also be performed were multiple clients would do this at the same time, and even then; the server frame time(s) remained identical and the whole thing never hung.
Client's clock could be behind or ahead of the server's, take this into account. Note that this code has been tested over night and only had a few hits when new baseline snapshots were applied on the server, or when there was a clock drift. It still requires an actual playtest with several players on low and high latency to determine if this is even needed.
- Check and clamp if commandTime is above serverTime (too far in future).
- Check commandTime delta before checking if above serverTime or below lastCommandTime.
- Make sure cmdTime is never lower than last.
- Make sure delta doesn't exceed maxUnlag.
- Make sure latency gets clamped to maxUnlag (clamp appears to be missing in the engine).
- Only check for cmdTime if we are not discarding the cmd; previously, already processed queued cmd's got checked before being discarded.
Temporary lag compensation exploit fix by clamping the difference. Exploiter could carefully control the detonation time of a grenade, or alter the ability cool downs by altering the 'CUserCmd::command_time' field before sending it up.
The implementation in the engine always took/returned signed 64bit size types, but I made a mistake when reversing the virtual function table. All types have been changed to what they should be (mostly signed 64bit, very few unsigned), and usage in-SDK has been adjusted accordingly.
Removed for:
* base_tickinterval_sp
* base_tickinterval_mp
* sv_updaterate_sp
* sv_updaterate_mp
* cl_updaterate_mp
Cvar 'cl_cmdrate' is deprecated in the engine and SDK since the CL_Move rebuild, and therefore has been removed entirely.