From: Mario Date: Sun, 30 Aug 2015 11:22:22 +0000 (+1000) Subject: Add inflictor to damage hook X-Git-Tag: xonotic-v0.8.2~1966 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=79e6e46f8e7a0fe3de9291c5efea0fa11d143980;p=xonotic%2Fxonotic-data.pk3dir.git Add inflictor to damage hook --- 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) \