mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-29 07:41:47 +00:00
Sleep 850 microseconds between dedicated server frames.
The dedicated server runs at cl_maxfps frames per second. Een with very large values one server frame can never be shorter than 1 milliseconds. And the timing doesn't need to be very precise since the network latency adds a lot of more jitter.
This commit is contained in:
parent
950e581103
commit
5fa6fa9175
1 changed files with 6 additions and 0 deletions
|
@ -41,7 +41,13 @@ main(int argc, char **argv)
|
||||||
int verLen, i;
|
int verLen, i;
|
||||||
long long oldtime, newtime;
|
long long oldtime, newtime;
|
||||||
const char* versionString;
|
const char* versionString;
|
||||||
|
|
||||||
|
// Time slept each frame.
|
||||||
|
#ifndef DEDICATED_ONLY
|
||||||
struct timespec t = {0, 5000};
|
struct timespec t = {0, 5000};
|
||||||
|
#else
|
||||||
|
struct timespec t = {0, 850000};
|
||||||
|
#endif
|
||||||
|
|
||||||
/* register signal handler */
|
/* register signal handler */
|
||||||
registerHandler();
|
registerHandler();
|
||||||
|
|
Loading…
Reference in a new issue