From c8bf82d0dae610b8763043f2e542e9b7464c775e Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 26 Nov 2015 20:43:07 +1000 Subject: [PATCH] Make sure self is set on the PlayerJump mutator hook --- qcsrc/common/mutators/events.qh | 1 + qcsrc/common/physics.qc | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/qcsrc/common/mutators/events.qh b/qcsrc/common/mutators/events.qh index d050ceb13..ed57753bd 100644 --- a/qcsrc/common/mutators/events.qh +++ b/qcsrc/common/mutators/events.qh @@ -72,6 +72,7 @@ MUTATOR_HOOKABLE(PlayerPhysics, EV_PlayerPhysics); /** called when a player presses the jump key */ #define EV_PlayerJump(i, o) \ + /**/ i(entity, __self) \ /**/ i(float, player_multijump) \ /**/ i(float, player_jumpheight) \ /**/ o(float, player_multijump) \ diff --git a/qcsrc/common/physics.qc b/qcsrc/common/physics.qc index 3d3128680..285321a9a 100644 --- a/qcsrc/common/physics.qc +++ b/qcsrc/common/physics.qc @@ -541,7 +541,7 @@ bool PlayerJump(entity this) bool doublejump = false; float mjumpheight = PHYS_JUMPVELOCITY(this); - if (MUTATOR_CALLHOOK(PlayerJump, doublejump, mjumpheight)) + if (MUTATOR_CALLHOOK(PlayerJump, this, doublejump, mjumpheight)) return true; doublejump = player_multijump; -- 2.39.2