]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cl_input.c
fix crash in SDL mode listing
[xonotic/darkplaces.git] / cl_input.c
index 4688041e514820be473c1722a66f05c681a365ad..803bd6711243f73610066b672ce63dd8c00c5c33 100644 (file)
@@ -826,7 +826,7 @@ void CL_ClientMovement_UpdateStatus(cl_clientmovement_state_t *s)
 
        // set onground
        VectorSet(origin1, s->origin[0], s->origin[1], s->origin[2] + 1);
-       VectorSet(origin2, s->origin[0], s->origin[1], s->origin[2] - 2);
+       VectorSet(origin2, s->origin[0], s->origin[1], s->origin[2] - 1); // -2 causes clientside doublejump bug at above 150fps, raising that to 300fps :)
        trace = CL_Move(origin1, s->mins, s->maxs, origin2, MOVE_NORMAL, NULL, SUPERCONTENTS_SOLID | SUPERCONTENTS_BODY | SUPERCONTENTS_PLAYERCLIP, true, true, NULL, false);
        s->onground = trace.fraction < 1 && trace.plane.normal[2] > 0.7;
 
@@ -1215,8 +1215,15 @@ void CL_ClientMovement_Physics_Walk(cl_clientmovement_state_t *s)
                        if(s->cmd.forwardmove == 0 && s->cmd.sidemove != 0)
                        {
                                if(cl.movevars_maxairstrafespeed)
+                               {
                                        if(wishspeed > cl.movevars_maxairstrafespeed)
                                                wishspeed = cl.movevars_maxairstrafespeed;
+                                       if(cl.movevars_maxairstrafespeed < cl.movevars_maxairspeed)
+                                               accelqw = 1;
+                                               // otherwise, CPMA-style air acceleration misbehaves a lot
+                                               // if partially non-QW acceleration is used (as in, strafing
+                                               // would get faster than moving forward straight)
+                               }
                                if(cl.movevars_airstrafeaccelerate)
                                {
                                        accel = cl.movevars_airstrafeaccelerate;