]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Enforce repressing key to jump if player is in view location and underwater
authorMario <mario@smbclan.net>
Sat, 18 Feb 2017 03:31:16 +0000 (13:31 +1000)
committerMario <mario@smbclan.net>
Sat, 18 Feb 2017 03:31:16 +0000 (13:31 +1000)
qcsrc/common/physics/player.qc

index 93ddb1e1b3f1329a1312af482a2dc268f0eccef6..6c1ec31cec6cd80bbe74e65fa8890f7e55578102 100644 (file)
@@ -292,6 +292,7 @@ bool PlayerJump(entity this)
 
        bool doublejump = false;
        float mjumpheight = PHYS_JUMPVELOCITY(this);
+       bool track_jump = PHYS_CL_TRACK_CANJUMP(this);
 
        if (MUTATOR_CALLHOOK(PlayerJump, this, mjumpheight, doublejump))
                return true;
@@ -305,6 +306,7 @@ bool PlayerJump(entity this)
                {
                        doublejump = true;
                        mjumpheight *= 0.7;
+                       track_jump = true;
                }
                else
                {
@@ -317,7 +319,6 @@ bool PlayerJump(entity this)
                if (!IS_ONGROUND(this) && !IS_ONSLICK(this))
                        return IS_JUMP_HELD(this);
 
-       bool track_jump = PHYS_CL_TRACK_CANJUMP(this);
        if(PHYS_TRACK_CANJUMP(this))
                track_jump = true;