]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
add missing normalize
authorRudolf Polzer <divverent@alientrap.org>
Tue, 20 Jul 2010 17:40:45 +0000 (19:40 +0200)
committerRudolf Polzer <divverent@alientrap.org>
Tue, 20 Jul 2010 17:40:45 +0000 (19:40 +0200)
qcsrc/server/cl_physics.qc

index 3c830e6d2f1c7795d2fbf1b6cceed2b42ce5202d..05f8676f26a7cd45450d45c2b251f867acb34248 100644 (file)
@@ -1205,7 +1205,7 @@ void SV_PlayerPhysics()
 
                        // CPM
                        if(sv_airstopaccelerate)
-                               airaccel = airaccel + (sv_airstopaccelerate*maxspd_mod - airaccel) * max(0, -(self.velocity * wishdir));
+                               airaccel = airaccel + (sv_airstopaccelerate*maxspd_mod - airaccel) * max(0, -(normalize(self.velocity) * wishdir));
                        // note that for straight forward jumping:
                        // step = accel * frametime * wishspeed0;
                        // accel  = bound(0, wishspeed - vel_xy_current, step) * accelqw + step * (1 - accelqw);