This fixes an ugly bug caused by a bug in the ugly netquake step up smoothing code :)

This commit is contained in:
Anton E. Gavrilov 2000-12-15 12:18:54 +00:00
parent ea2a5c6f3e
commit 32910a1b5f
3 changed files with 5 additions and 2 deletions

View file

@ -280,7 +280,7 @@ typedef struct
float driftmove; float driftmove;
double laststop; double laststop;
int onground; // -1 when in air
float crouch; // local amount for smoothing stepups float crouch; // local amount for smoothing stepups
qboolean paused; // send over by server qboolean paused; // send over by server

View file

@ -150,6 +150,8 @@ CL_PredictMove (void)
if (cl.paused) if (cl.paused)
return; return;
cl.onground = 0; // assume on ground unless prediction says different
cl.time = realtime - cls.latency - cl_pushlatency->value * 0.001; cl.time = realtime - cls.latency - cl_pushlatency->value * 0.001;
if (cl.time > realtime) if (cl.time > realtime)
cl.time = realtime; cl.time = realtime;
@ -193,6 +195,7 @@ CL_PredictMove (void)
CL_PredictUsercmd (&from->playerstate[cl.playernum] CL_PredictUsercmd (&from->playerstate[cl.playernum]
, &to->playerstate[cl.playernum], &to->cmd, , &to->playerstate[cl.playernum], &to->cmd,
cl.spectator); cl.spectator);
cl.onground = onground;
if (to->senttime >= cl.time) if (to->senttime >= cl.time)
break; break;
from = to; from = to;

View file

@ -734,7 +734,7 @@ V_CalcRefdef (void)
r_refdef.viewangles[PITCH] += cl.punchangle; r_refdef.viewangles[PITCH] += cl.punchangle;
// smooth out stair step ups // smooth out stair step ups
if ((view_message->onground != -1) && (cl.simorg[2] - oldz > 0)) { if ((cl.onground != -1) && (cl.simorg[2] - oldz > 0)) {
float steptime; float steptime;
steptime = host_frametime; steptime = host_frametime;