From 79e6e46f8e7a0fe3de9291c5efea0fa11d143980 Mon Sep 17 00:00:00 2001 From: Mario Date: Sun, 30 Aug 2015 21:22:22 +1000 Subject: [PATCH] Add inflictor to damage hook --- qcsrc/server/g_damage.qc | 2 +- qcsrc/server/mutators/events.qh | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/qcsrc/server/g_damage.qc b/qcsrc/server/g_damage.qc index 2ef47bec1..0807c924c 100644 --- a/qcsrc/server/g_damage.qc +++ b/qcsrc/server/g_damage.qc @@ -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; diff --git a/qcsrc/server/mutators/events.qh b/qcsrc/server/mutators/events.qh index 1dd82a88f..e867e049a 100644 --- a/qcsrc/server/mutators/events.qh +++ b/qcsrc/server/mutators/events.qh @@ -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) \ -- 2.39.2