Add inflictor to damage hook
authorMario <zacjardine@y7mail.com>
Sun, 30 Aug 2015 11:22:22 +0000 (21:22 +1000)
committerMario <zacjardine@y7mail.com>
Sun, 30 Aug 2015 11:22:22 +0000 (21:22 +1000)
qcsrc/server/g_damage.qc
qcsrc/server/mutators/events.qh

index 2ef47be..0807c92 100644 (file)
@@ -748,7 +748,7 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, int d
                }
 
                // should this be changed at all? If so, in what way?
-               MUTATOR_CALLHOOK(PlayerDamage_Calculate, attacker, targ, deathtype, damage, mirrordamage, force);
+               MUTATOR_CALLHOOK(PlayerDamage_Calculate, inflictor, attacker, targ, deathtype, damage, mirrordamage, force);
                damage = frag_damage;
                mirrordamage = frag_mirrordamage;
                force = frag_force;
index 1dd82a8..e867e04 100644 (file)
@@ -308,6 +308,7 @@ MUTATOR_HOOKABLE(PlayerDamage_SplitHealthArmor, EV_PlayerDamage_SplitHealthArmor
  * i'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).
  */
 #define EV_PlayerDamage_Calculate(i, o) \
+    /**/ i(entity, frag_inflictor) \
     /**/ i(entity, frag_attacker) \
     /**/ i(entity, frag_target) \
     /**/ i(float, frag_deathtype) \