diff --git a/source/host.c b/source/host.c index a35c9c0..871a906 100644 --- a/source/host.c +++ b/source/host.c @@ -83,6 +83,8 @@ cvar_t pausable = {"pausable","1"}; cvar_t temp1 = {"temp1","0"}; +cvar_t host_timescale = {"host_timescale", "0"}; //johnfitz + qboolean bmg_type_changed = false; @@ -239,6 +241,7 @@ void Host_InitLocal (void) Cvar_RegisterVariable (&pausable); Cvar_RegisterVariable (&temp1); + Cvar_RegisterVariable (&host_timescale); Host_FindMaxClients (); @@ -537,11 +540,6 @@ qboolean Host_FilterTime (float time) { realtime += time; -/* dr_mabuse1981: old dquake values commented out - if (!cls.timedemo && realtime - oldrealtime < 1.0/250.0) - return false; // framerate is too high -*/ - if (cl_maxfps.value < 1) Cvar_SetValue("cl_maxfps", 30); if (!cls.timedemo && realtime - oldrealtime < 1.0/cl_maxfps.value) return false; // framerate is too high @@ -549,15 +547,14 @@ qboolean Host_FilterTime (float time) host_frametime = realtime - oldrealtime; oldrealtime = realtime; - if (host_framerate.value > 0) + //johnfitz -- host_timescale is more intuitive than host_framerate + if (host_timescale.value > 0) + host_frametime *= host_timescale.value; + //johnfitz + else if (host_framerate.value > 0) host_frametime = host_framerate.value; - else - { // don't allow really long or short frames - if (host_frametime > 0.1) - host_frametime = 0.1; - if (host_frametime < 0.001) - host_frametime = 0.001; - } + else // don't allow really long or short frames + host_frametime = CLAMP (0.001, host_frametime, 0.1); //johnfitz -- use CLAMP return true; } diff --git a/source/psp/wad3.cpp b/source/psp/wad3.cpp index 1eef404..951a5ab 100644 --- a/source/psp/wad3.cpp +++ b/source/psp/wad3.cpp @@ -494,6 +494,6 @@ byte *W_GetTextureHL(char *name) else break; } - + tex->width = tex->width = 0; return NULL; }