From: Mario Date: Thu, 5 Jan 2017 17:57:18 +0000 (+1000) Subject: Add the weapon entity to the firebullet mutator hook X-Git-Tag: xonotic-v0.8.2~320 X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=commitdiff_plain;h=e169123eddb2141b43e305390cbe3d528c46d695 Add the weapon entity to the firebullet mutator hook --- diff --git a/qcsrc/server/mutators/events.qh b/qcsrc/server/mutators/events.qh index 7bce389c3a..ebe03df12d 100644 --- a/qcsrc/server/mutators/events.qh +++ b/qcsrc/server/mutators/events.qh @@ -664,6 +664,7 @@ MUTATOR_HOOKABLE(GetModelParams, EV_GetModelParams); /** end pos */ i(vector, MUTATOR_ARGV_3_vector) \ /** damage */ i(float, MUTATOR_ARGV_4_float) \ /**/ o(float, MUTATOR_ARGV_4_float) \ + /** wep entity */ i(entity, MUTATOR_ARGV_5_entity) \ /**/ MUTATOR_HOOKABLE(FireBullet_Hit, EV_FireBullet_Hit); diff --git a/qcsrc/server/weapons/tracing.qc b/qcsrc/server/weapons/tracing.qc index 66a76fcf97..3c4eb44a0d 100644 --- a/qcsrc/server/weapons/tracing.qc +++ b/qcsrc/server/weapons/tracing.qc @@ -436,7 +436,7 @@ void fireBullet(entity this, .entity weaponentity, vector start, vector dir, flo { fireBullet_last_hit = hit; yoda = 0; - MUTATOR_CALLHOOK(FireBullet_Hit, this, hit, start, end, damage); + MUTATOR_CALLHOOK(FireBullet_Hit, this, hit, start, end, damage, this.(weaponentity)); damage = M_ARGV(4, float); float g = accuracy_isgooddamage(this, hit); Damage(hit, this, this, damage * solid_penetration_left, dtype, start, force * dir * solid_penetration_left);