]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
fixed another C99 lazy variable declaration bug in div0's physics patch
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 9 Jun 2006 07:50:42 +0000 (07:50 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 9 Jun 2006 07:50:42 +0000 (07:50 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6450 d7cf8633-e32d-0410-b094-e92efae38249

cl_input.c

index f7cd45df7bb00f7d2738d8958b3fdd28d6e6e2d2..ae0ba2f6e77bc67366803b7b50f621da9e8c8cb6 100644 (file)
@@ -993,6 +993,7 @@ void CL_ClientMovement_Physics_Walk(cl_clientmovement_state_t *s)
        {
                if (s->waterjumptime <= 0)
                {
+                       vec_t f;
                        vec_t vel_straight;
                        vec_t vel_z;
                        vec3_t vel_perpend;
@@ -1014,7 +1015,7 @@ void CL_ClientMovement_Physics_Walk(cl_clientmovement_state_t *s)
                        VectorMA(s->velocity, -vel_straight, wishdir, vel_perpend);
                        vel_perpend[2] -= vel_z;
 
-                       vec_t f = wishspeed - vel_straight;
+                       f = wishspeed - vel_straight;
                        if(f > 0)
                                vel_straight += min(f, s->movevars_accelerate * s->q.frametime * wishspeed) * s->movevars_airaccel_qw;
                        if(wishspeed > 0)