From: divverent Date: Sat, 10 Sep 2011 20:55:32 +0000 (+0000) Subject: fix one bug in cl_movement_track_canjump. Still buggy. X-Git-Tag: xonotic-v0.6.0~340 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=f3901a53ea48f79e66d82a1ff0dabf943609a6a2;p=xonotic%2Fdarkplaces.git fix one bug in cl_movement_track_canjump. Still buggy. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11337 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=865254938bfcc5e64e900dc3fb66f964e2f4e911 --- diff --git a/cl_input.c b/cl_input.c index d357c115..5e5b5817 100644 --- a/cl_input.c +++ b/cl_input.c @@ -1329,7 +1329,7 @@ void CL_ClientMovement_Physics_Walk(cl_clientmovement_state_t *s) // released at least once since the last jump if (s->cmd.jump) { - if (s->onground && (s->cmd.canjump || !cl_movement_track_canjump.integer)) // FIXME remove this cvar again when canjump logic actually works, or maybe keep it for mods that allow "pogo-ing" + if (s->onground && (s->cmd.canjump || !cl_movement_track_canjump.integer)) { s->velocity[2] += cl.movevars_jumpvelocity; s->onground = false; @@ -1610,7 +1610,6 @@ void CL_ClientMovement_Replay(void) s.cmd = cl.movecmd[i]; if (i < CL_MAX_USERCMDS - 1) s.cmd.canjump = cl.movecmd[i+1].canjump; - // FIXME doesn't this read from unused slots? shouldn't this rather be limited to the initial value of i? // if a move is more than 50ms, do it as two moves (matching qwsv) //Con_Printf("%i ", s.cmd.msec); @@ -1624,6 +1623,12 @@ void CL_ClientMovement_Replay(void) CL_ClientMovement_PlayerMove(&s); cl.movecmd[i].canjump = s.cmd.canjump; } + else + { + // we REALLY need this handling to happen, even if the move is not executed + if (!cl.movecmd[i].jump) + cl.movecmd[i].canjump = true; + } } //Con_Printf("\n"); CL_ClientMovement_UpdateStatus(&s);