]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix the addition of time to pmove_waterjumptime (doesn't fix water jumping, yet)
authorMario <mario@smbclan.net>
Thu, 4 Feb 2016 09:58:51 +0000 (19:58 +1000)
committerMario <mario@smbclan.net>
Thu, 4 Feb 2016 09:58:51 +0000 (19:58 +1000)
qcsrc/common/physics/player.qc

index 4356ba2864e0a249995f15283b3625868f2915b5..0da3c1df375520f02ab2608b824d6f8afaa4bbe6 100644 (file)
@@ -560,7 +560,7 @@ void CheckWaterJump(entity this)
                #ifdef SVQC
                        PHYS_TELEPORT_TIME(this) = time + 2;    // safety net
                #elif defined(CSQC)
-                       pmove_waterjumptime = time + 2;
+                       pmove_waterjumptime = 2;
                #endif
                }
        }
@@ -1484,10 +1484,17 @@ void PM_Main(entity this)
        {
                this.velocity_x = this.movedir.x;
                this.velocity_y = this.movedir.y;
-               if (time > PHYS_TELEPORT_TIME(this) || this.waterlevel == WATERLEVEL_NONE)
+               if (time > PHYS_TELEPORT_TIME(this) || this.waterlevel == WATERLEVEL_NONE
+               #ifdef CSQC
+                       || pmove_waterjumptime <= 0
+               #endif
+                       )
                {
                        this.flags &= ~FL_WATERJUMP;
                        PHYS_TELEPORT_TIME(this) = 0;
+               #ifdef CSQC
+                       pmove_waterjumptime = 0;
+               #endif
                }
        }