From 32910a1b5fb6cb67b0248d0077a8a64153df42af Mon Sep 17 00:00:00 2001 From: "Anton E. Gavrilov" Date: Fri, 15 Dec 2000 12:18:54 +0000 Subject: [PATCH] This fixes an ugly bug caused by a bug in the ugly netquake step up smoothing code :) --- include/client.h | 2 +- source/cl_pred.c | 3 +++ source/r_view.c | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/include/client.h b/include/client.h index 7f776d2..7010e52 100644 --- a/include/client.h +++ b/include/client.h @@ -280,7 +280,7 @@ typedef struct float driftmove; double laststop; - + int onground; // -1 when in air float crouch; // local amount for smoothing stepups qboolean paused; // send over by server diff --git a/source/cl_pred.c b/source/cl_pred.c index 826884b..ccc70f2 100644 --- a/source/cl_pred.c +++ b/source/cl_pred.c @@ -150,6 +150,8 @@ CL_PredictMove (void) if (cl.paused) return; + cl.onground = 0; // assume on ground unless prediction says different + cl.time = realtime - cls.latency - cl_pushlatency->value * 0.001; if (cl.time > realtime) cl.time = realtime; @@ -193,6 +195,7 @@ CL_PredictMove (void) CL_PredictUsercmd (&from->playerstate[cl.playernum] , &to->playerstate[cl.playernum], &to->cmd, cl.spectator); + cl.onground = onground; if (to->senttime >= cl.time) break; from = to; diff --git a/source/r_view.c b/source/r_view.c index dfb4bdd..f30d6fd 100644 --- a/source/r_view.c +++ b/source/r_view.c @@ -734,7 +734,7 @@ V_CalcRefdef (void) r_refdef.viewangles[PITCH] += cl.punchangle; // 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; steptime = host_frametime;