]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Make sure self is set on the PlayerJump mutator hook
authorMario <mario@smbclan.net>
Thu, 26 Nov 2015 10:43:07 +0000 (20:43 +1000)
committerMario <mario@smbclan.net>
Thu, 26 Nov 2015 10:43:07 +0000 (20:43 +1000)
qcsrc/common/mutators/events.qh
qcsrc/common/physics.qc

index d050ceb13eddd5ff55c187eb05bad8d0fca191b7..ed57753bdece4b34514d6bf241518690967d5853 100644 (file)
@@ -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) \
index 3d3128680f55b121eac049ebff9b227ea75d7df4..285321a9a504cb27d532d0a97fdc1c9d39640a39 100644 (file)
@@ -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;