mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-26 22:31:05 +00:00
I figured out why realtime 0 caused progs to crash }:) ph33r me. Or
not. Your choice. if sv_frametime is less than or equal to zero, progs does not enjoy life. Don't make progs suicide, join the > 0 club today! Tim McGrath (Misty)
This commit is contained in:
parent
46949068a2
commit
25ec0b8efd
2 changed files with 17 additions and 9 deletions
|
@ -331,6 +331,9 @@ SV_SpawnServer (const char *server)
|
|||
|
||||
strcpy (sv.name, server);
|
||||
|
||||
// Misty: What, me worry? (Yes, it's BAAAACK) HACKHACKHACK
|
||||
realtime = 0.1;
|
||||
|
||||
// load progs to get entity field count which determines how big each
|
||||
// edict is
|
||||
SV_LoadProgs ();
|
||||
|
|
|
@ -1885,20 +1885,25 @@ SV_Frame (float time)
|
|||
if (!sv.paused) {
|
||||
static double old_time;
|
||||
|
||||
// Misty: Make sure we don't set sv_frametime to 0 or less than 0.
|
||||
// Progs HATES it when we do that.
|
||||
if (realtime - old_time > 0) {
|
||||
// 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) {
|
||||
sv_frametime = sv_maxtic->value;
|
||||
sv_frametime = realtime - old_time;
|
||||
if (sv_frametime >= sv_mintic->value) {
|
||||
if (sv_frametime > sv_maxtic->value) {
|
||||
sv_frametime = sv_maxtic->value;
|
||||
}
|
||||
old_time = realtime;
|
||||
|
||||
*sv_globals.frametime = sv_frametime;
|
||||
|
||||
SV_Physics ();
|
||||
}
|
||||
} else {
|
||||
old_time = realtime;
|
||||
|
||||
*sv_globals.frametime = sv_frametime;
|
||||
|
||||
SV_Physics ();
|
||||
}
|
||||
}
|
||||
|
||||
// get packets
|
||||
SV_ReadPackets ();
|
||||
|
||||
|
|
Loading…
Reference in a new issue