From: Mario Date: Fri, 10 Jun 2016 15:32:39 +0000 (+1000) Subject: Give Weapon_ImpactEffect an argument for the effect entity X-Git-Tag: xonotic-v0.8.2~838 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=bb546c1946b7b925f24b1473ad89789746acc4c2;p=xonotic%2Fxonotic-data.pk3dir.git Give Weapon_ImpactEffect an argument for the effect entity --- diff --git a/qcsrc/client/mutators/events.qh b/qcsrc/client/mutators/events.qh index 58ed12952..9a2e8b137 100644 --- a/qcsrc/client/mutators/events.qh +++ b/qcsrc/client/mutators/events.qh @@ -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); diff --git a/qcsrc/common/effects/qc/damageeffects.qc b/qcsrc/common/effects/qc/damageeffects.qc index 30a0a0c9e..078083cf9 100644 --- a/qcsrc/common/effects/qc/damageeffects.qc +++ b/qcsrc/common/effects/qc/damageeffects.qc @@ -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); } }