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 93ddb1e..6c1ec31 100644 (file)
@@ -292,6 +292,7 @@ bool PlayerJump(entity this)
 
        bool doublejump = false;
        float mjumpheight = PHYS_JUMPVELOCITY(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;
 
        if (MUTATOR_CALLHOOK(PlayerJump, this, mjumpheight, doublejump))
                return true;
@@ -305,6 +306,7 @@ bool PlayerJump(entity this)
                {
                        doublejump = true;
                        mjumpheight *= 0.7;
                {
                        doublejump = true;
                        mjumpheight *= 0.7;
+                       track_jump = true;
                }
                else
                {
                }
                else
                {
@@ -317,7 +319,6 @@ bool PlayerJump(entity this)
                if (!IS_ONGROUND(this) && !IS_ONSLICK(this))
                        return IS_JUMP_HELD(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;
 
        if(PHYS_TRACK_CANJUMP(this))
                track_jump = true;