From: Mario Date: Sat, 18 Feb 2017 03:31:16 +0000 (+1000) Subject: Enforce repressing key to jump if player is in view location and underwater X-Git-Tag: xonotic-v0.8.2~201 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=5a98a11e5028cbdd527d52292b525352eee954b4;p=xonotic%2Fxonotic-data.pk3dir.git Enforce repressing key to jump if player is in view location and underwater --- 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;