From: divverent Date: Tue, 20 Jul 2010 17:54:56 +0000 (+0000) Subject: make airstopaccelerate less accidentally epic ;) X-Git-Tag: xonotic-v0.1.0preview~315 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=bd185cab03564f16fcfc82da95c1b7ca08cc548b;p=xonotic%2Fdarkplaces.git make airstopaccelerate less accidentally epic ;) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10356 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=2e6f913682aef4d97a28375d7a0085d61143779e --- diff --git a/cl_input.c b/cl_input.c index bc8a4597..d4ab8a01 100644 --- a/cl_input.c +++ b/cl_input.c @@ -1399,8 +1399,14 @@ void CL_ClientMovement_Physics_Walk(cl_clientmovement_state_t *s) // CPM: air control if(cl.movevars_airstopaccelerate != 0) - if(DotProduct(s->velocity, wishdir) < 0) - accel = cl.movevars_airstopaccelerate; + { + vec3_t curdir; + curdir[0] = s->velocity[0]; + curdir[1] = s->velocity[1]; + curdir[2] = 0; + VectorNormalize(curdir); + accel = accel + (cl.movevars_airstopaccelerate - accel) * max(0, -DotProduct(curdir, wishdir)); + } strafity = CL_IsMoveInDirection(s->cmd.forwardmove, s->cmd.sidemove, -90) + CL_IsMoveInDirection(s->cmd.forwardmove, s->cmd.sidemove, +90); // if one is nonzero, other is always zero if(cl.movevars_maxairstrafespeed) wishspeed = min(wishspeed, CL_GeomLerp(cl.movevars_maxairspeed, strafity, cl.movevars_maxairstrafespeed));