From: Mario Date: Thu, 26 Nov 2015 10:43:07 +0000 (+1000) Subject: Make sure self is set on the PlayerJump mutator hook X-Git-Tag: xonotic-v0.8.2~1616 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=c8bf82d0dae610b8763043f2e542e9b7464c775e;p=xonotic%2Fxonotic-data.pk3dir.git Make sure self is set on the PlayerJump mutator hook --- 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;