]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Give Weapon_ImpactEffect an argument for the effect entity
authorMario <mario@smbclan.net>
Fri, 10 Jun 2016 15:32:39 +0000 (01:32 +1000)
committerMario <mario@smbclan.net>
Fri, 10 Jun 2016 15:32:39 +0000 (01:32 +1000)
qcsrc/client/mutators/events.qh
qcsrc/common/effects/qc/damageeffects.qc

index 58ed12952a2a1a4f247a22339028a97f837af6ae..9a2e8b1373be23d9d79db6e53fe9326384beb8b3 100644 (file)
@@ -113,7 +113,8 @@ MUTATOR_HOOKABLE(Particles_VortexBeam, EV_Particles_VortexBeam);
 
 /** Return true to not draw any impact effect */
 #define EV_Weapon_ImpactEffect(i, o) \
-       /** entity id */ i(entity, MUTATOR_ARGV_0_entity) \
+       /** weapon */                   i(entity, MUTATOR_ARGV_0_entity) \
+       /** damage entity */    i(entity, MUTATOR_ARGV_1_entity) \
        /**/
 MUTATOR_HOOKABLE(Weapon_ImpactEffect, EV_Weapon_ImpactEffect);
 
index 30a0a0c9e589e5eeec56602a722e1bbbea8f71a1..078083cf92fefdfb862404acd3850efb17f61276 100644 (file)
@@ -417,7 +417,7 @@ NET_HANDLE(ENT_CLIENT_DAMAGEINFO, bool isNew)
 
                if(!(trace_dphitq3surfaceflags & Q3SURFACEFLAG_SKY))
                {
-                       if(!MUTATOR_CALLHOOK(Weapon_ImpactEffect, hitwep))
+                       if(!MUTATOR_CALLHOOK(Weapon_ImpactEffect, hitwep, this))
                                hitwep.wr_impacteffect(hitwep, this);
                }
        }