diff --git a/Quake/cl_main.c b/Quake/cl_main.c index 78440e54..bb42cecc 100644 --- a/Quake/cl_main.c +++ b/Quake/cl_main.c @@ -600,7 +600,7 @@ CL_ResetTrail */ static void CL_ResetTrail (entity_t *ent) { - ent->traildelay = 1.f / 72.f; + ent->traildelay = 1.f / MAX_PHYSICS_FREQ; VectorCopy (ent->origin, ent->trailorg); } @@ -618,7 +618,7 @@ static void CL_RocketTrail (entity_t *ent, int type) return; R_RocketTrail (ent->trailorg, ent->origin, type); - ent->traildelay = q_max (0.f, ent->traildelay + 1.f / 72.f); + ent->traildelay = q_max (0.f, ent->traildelay + 1.f / MAX_PHYSICS_FREQ); VectorCopy (ent->origin, ent->trailorg); } diff --git a/Quake/host.c b/Quake/host.c index e3e04755..0a7b605e 100644 --- a/Quake/host.c +++ b/Quake/host.c @@ -59,7 +59,7 @@ jmp_buf host_abortserver; jmp_buf screen_error; byte *host_colormap; -float host_netinterval = 1.0 / 72; +float host_netinterval = 1.0 / MAX_PHYSICS_FREQ; cvar_t host_framerate = {"host_framerate", "0", CVAR_NONE}; // set for slow motion cvar_t host_speeds = {"host_speeds", "0", CVAR_NONE}; // set for running times cvar_t host_maxfps = {"host_maxfps", "200", CVAR_ARCHIVE}; // johnfitz @@ -117,11 +117,11 @@ Max_Fps_f -- ericw */ static void Max_Fps_f (cvar_t *var) { - if (var->value > 72 || var->value <= 0) + if (var->value > MAX_PHYSICS_FREQ || var->value <= 0) { if (!host_netinterval) Con_Printf ("Using renderer/network isolation.\n"); - host_netinterval = 1.0 / 72; + host_netinterval = 1.0 / MAX_PHYSICS_FREQ; } else { @@ -129,7 +129,7 @@ static void Max_Fps_f (cvar_t *var) Con_Printf ("Disabling renderer/network isolation.\n"); host_netinterval = 0; - if (var->value > 72) + if (var->value > MAX_PHYSICS_FREQ) Con_Warning ("host_maxfps above 72 breaks physics.\n"); } } diff --git a/Quake/quakedef.h b/Quake/quakedef.h index c831f218..b675532f 100644 --- a/Quake/quakedef.h +++ b/Quake/quakedef.h @@ -65,6 +65,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define DIST_EPSILON (0.03125) // 1/32 epsilon to keep floating point happy (moved from world.c) +#define MAX_PHYSICS_FREQ (72.0) // Physics beyond 72Hz is broken + #define MAX_MSGLEN 64000 // max length of a reliable message //ericw -- was 32000 #define MAX_DATAGRAM 64000 // max length of unreliable message //johnfitz -- was 1024