]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Give the DamageInfo hook a couple of useful parameters
authorMario <mario@smbclan.net>
Sat, 5 Aug 2017 00:29:20 +0000 (10:29 +1000)
committerMario <mario@smbclan.net>
Sat, 5 Aug 2017 00:29:20 +0000 (10:29 +1000)
qcsrc/client/mutators/events.qh
qcsrc/common/effects/qc/damageeffects.qc

index f6f8441f32215b41e106435dc4f8ac05417fa01d..24d634ce8213e05759f7afed13f2f0b011be5146 100644 (file)
@@ -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);
index e9298bf02a661e8cd8562767808b2ac97d8f6a64..38241c2cc2df62999807f2cc2b153580a2c40d15 100644 (file)
@@ -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))