]> de.git.xonotic.org Git - xonotic/darkplaces.git/commit
client: Improve input packet timing (netfps)
authorcloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 11 Apr 2021 16:46:13 +0000 (16:46 +0000)
committercloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 11 Apr 2021 16:46:13 +0000 (16:46 +0000)
commit1b6ea396b616e359cfe98d1e85e8e7a9ac571e91
treecd6900a49c874a7f380c457f67560e23f9048e4d
parentf7c0efe1b3ba9afec920506b3e30c8f0a8de769f
client: Improve input packet timing (netfps)

Increase min netfps to 10 (matches min ticrate).

Skip packettime calculations for 0ms packets.

Cap netfps when ticrate stat is available:
soft limit 2x, hard limit < 4x server frame rate.

Set packettime to (largest multiple of realframetime) <= packettime.
Prevents packet rates lower than cl_netfps or server frame rate,
eg: cl_netfps 60 and cl_maxfps 250 would otherwise send only 50 netfps.

Allow for float error when deciding if it's time to send yet.

Accumulate realframetime instead of storing host.realtime.
Fixes low packet rates in some configurations,
eg: with cl_maxfps 125 and cl_netfps 125 it would not send every frame,
as host.realtime - lastpackettime was often well below (or above) 8ms.

Authored by bones_was_here
https://gitlab.com/xonotic/darkplaces/-/merge_requests/112

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@13113 d7cf8633-e32d-0410-b094-e92efae38249
cl_input.c
client.h