From 5a98a11e5028cbdd527d52292b525352eee954b4 Mon Sep 17 00:00:00 2001 From: Mario Date: Sat, 18 Feb 2017 13:31:16 +1000 Subject: [PATCH] Enforce repressing key to jump if player is in view location and underwater --- qcsrc/common/physics/player.qc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qcsrc/common/physics/player.qc b/qcsrc/common/physics/player.qc index 93ddb1e1b..6c1ec31ce 100644 --- a/qcsrc/common/physics/player.qc +++ b/qcsrc/common/physics/player.qc @@ -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; -- 2.39.2