]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
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 7bce389c3a458b2ca98256d210cbe19bb9d1554d..ebe03df12d206ae45b2506828653104a8fe06033 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 66a76fcf9784329f2b1b3934c04913b57acb3ca6..3c4eb44a0d43bf409b307de42346823d4fb357a1 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);