From bc78ea10c6fd42401fc52a59f0712d494c8e4a32 Mon Sep 17 00:00:00 2001 From: Mario Date: Sat, 5 Aug 2017 10:29:20 +1000 Subject: [PATCH] Give the DamageInfo hook a couple of useful parameters --- qcsrc/client/mutators/events.qh | 2 ++ qcsrc/common/effects/qc/damageeffects.qc | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/qcsrc/client/mutators/events.qh b/qcsrc/client/mutators/events.qh index f6f8441f3..24d634ce8 100644 --- a/qcsrc/client/mutators/events.qh +++ b/qcsrc/client/mutators/events.qh @@ -190,5 +190,7 @@ MUTATOR_HOOKABLE(ForcePlayermodels_Skip, EV_ForcePlayermodels_Skip); /** Called when damage info is received on the client, useful for playing explosion effects */ #define EV_DamageInfo(i, o) \ /** entity id */ i(entity, MUTATOR_ARGV_0_entity) \ + /** death type */ i(int, MUTATOR_ARGV_1_int) \ + /** hit origin */ i(vector, MUTATOR_ARGV_2_vector) \ /**/ MUTATOR_HOOKABLE(DamageInfo, EV_DamageInfo); diff --git a/qcsrc/common/effects/qc/damageeffects.qc b/qcsrc/common/effects/qc/damageeffects.qc index e9298bf02..38241c2cc 100644 --- a/qcsrc/common/effects/qc/damageeffects.qc +++ b/qcsrc/common/effects/qc/damageeffects.qc @@ -390,7 +390,7 @@ NET_HANDLE(ENT_CLIENT_DAMAGEINFO, bool isNew) } } - MUTATOR_CALLHOOK(DamageInfo, this); + MUTATOR_CALLHOOK(DamageInfo, this, w_deathtype, w_org); // TODO spawn particle effects and sounds based on w_deathtype if(!DEATH_ISSPECIAL(w_deathtype)) -- 2.39.2