mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +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,6 +1885,9 @@ 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) {
|
||||
|
@ -1897,8 +1900,10 @@ SV_Frame (float time)
|
|||
|
||||
SV_Physics ();
|
||||
}
|
||||
} else {
|
||||
old_time = realtime;
|
||||
}
|
||||
}
|
||||
|
||||
// get packets
|
||||
SV_ReadPackets ();
|
||||
|
||||
|
|
Loading…
Reference in a new issue