mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
This hack makes realtime get reset on map load (in sv_init.c, set to 0)
and also prevents old_time in sv_main.c from getting screwed up in the head and pausing the physics indefinitely (check and see if there is a faster way to do it :) What does this let us do? LEAVE THE SERVER RUNNING! Imprecision due to the server being on for long periods of time should now no longer be a problem, so long as you have a map rotation going at least once a day. :) I plan on committing updated versions of my glspeed cfgs next, and then looking at timeleft - just to make sure when sys_dead_sleep is 1 it can't overflow accidentally. Tim McGrath (Misty)
This commit is contained in:
parent
ddd96312b1
commit
8ebd2c6243
2 changed files with 6 additions and 3 deletions
|
@ -353,7 +353,9 @@ SV_SpawnServer (const char *server)
|
|||
}
|
||||
|
||||
sv.time = 1.0;
|
||||
|
||||
// Misty HACKHACKHACK
|
||||
realtime = 0;
|
||||
|
||||
strncpy (sv.name, server, sizeof (sv.name));
|
||||
snprintf (sv.modelname, sizeof (sv.modelname), "maps/%s.bsp", server);
|
||||
sv.worldmodel = Mod_ForName (sv.modelname, true);
|
||||
|
|
|
@ -1887,14 +1887,15 @@ SV_Frame (float time)
|
|||
|
||||
// don't bother running a frame if sys_ticrate seconds haven't passed
|
||||
sv_frametime = realtime - old_time;
|
||||
if (sv_frametime >= sv_mintic->value) {
|
||||
if (sv_frametime > sv_maxtic->value)
|
||||
if ((sv_frametime >= sv_mintic->value) || (sv_frametime <= 0)) {
|
||||
if ((sv_frametime > sv_maxtic->value) || (sv_frametime <= 0)) {
|
||||
sv_frametime = sv_maxtic->value;
|
||||
old_time = realtime;
|
||||
|
||||
*sv_globals.frametime = sv_frametime;
|
||||
|
||||
SV_Physics ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue