Add the weapon entity to the firebullet mutator hook
authorMario <mario@smbclan.net>
Thu, 5 Jan 2017 17:57:18 +0000 (03:57 +1000)
committerMario <mario@smbclan.net>
Thu, 5 Jan 2017 17:57:18 +0000 (03:57 +1000)
qcsrc/server/mutators/events.qh
qcsrc/server/weapons/tracing.qc

index 7bce389..ebe03df 100644 (file)
@@ -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);
 
index 66a76fc..3c4eb44 100644 (file)
@@ -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);