]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
fixed double-jump bug in prediction when jumping up sides of crates or on stairs
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 5 Feb 2007 09:04:01 +0000 (09:04 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 5 Feb 2007 09:04:01 +0000 (09:04 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6793 d7cf8633-e32d-0410-b094-e92efae38249

cl_input.c

index a6f447610c8ba75e47ae954f24bd41a25dc364da..60144ddf4b5fdba6ec9ddec6f9d0a2501aca6c5c 100644 (file)
@@ -773,7 +773,7 @@ void CL_ClientMovement_UpdateStatus(cl_clientmovement_state_t *s)
        VectorSet(origin1, s->origin[0], s->origin[1], s->origin[2] + 1);
        VectorSet(origin2, s->origin[0], s->origin[1], s->origin[2] - 2);
        trace = CL_TraceBox(origin1, s->mins, s->maxs, origin2, true, NULL, SUPERCONTENTS_SOLID | SUPERCONTENTS_BODY | SUPERCONTENTS_PLAYERCLIP, true);
-       s->onground = trace.fraction < 1 && trace.plane.normal[2] > 0.7;
+       s->onground = trace.fraction < 1 && trace.plane.normal[2] > 0.7 && s->velocity[2] < cl_gravity.value * s->q.frametime;
 
        // set watertype/waterlevel
        VectorSet(origin1, s->origin[0], s->origin[1], s->origin[2] + s->mins[2] + 1);