]> git.rm.cloudns.org Git - voretournament/voretournament.git/commitdiff
Fix infinite multijumps
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Thu, 14 Apr 2011 11:39:13 +0000 (14:39 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Thu, 14 Apr 2011 11:39:13 +0000 (14:39 +0300)
data/qcsrc/server/cl_physics.qc

index 8743d595797d3efa8c3eb131548a8f3571b40ed6..f917d8b611370a71971c7ceff2afafdc55bab9d2 100644 (file)
@@ -77,7 +77,7 @@ void PlayerJump (void)
        if(!doublejump && self.multijump_ready && self.multijump_count < cvar("g_multijump") && self.velocity_z > cvar("g_multijump_speed"))\r
        {\r
                // doublejump = FALSE; // checked above in the if\r
-               if (cvar("g_multijump") > 0)\r
+               if (cvar("g_multijump"))\r
                {\r
                        if (cvar("g_multijump_add") == 0) // in this case we make the z velocity == jumpvelocity\r
                        {\r
@@ -109,7 +109,8 @@ void PlayerJump (void)
                                        self.velocity_y = wishdir_y * curspeed;\r
                                        // keep velocity_z unchanged!\r
                                }\r
-                               self.multijump_count += 1;\r
+                               if (cvar("g_multijump") > 0)\r
+                                       self.multijump_count += 1;\r
                        }\r
                }\r
                self.multijump_ready = FALSE; // require releasing and pressing the jump button again for the next jump\r