]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
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 2ef47bec1eb6f49e890aa283a350e3f4ab2e8452..0807c924c2d1f584afb153c5039e06f282306944 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?
                }
 
                // 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;
                damage = frag_damage;
                mirrordamage = frag_mirrordamage;
                force = frag_force;
index 1dd82a88f27abc2c581a340587954ee40b1be23b..e867e049a398cb1b253638644c6836573094a6d4 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'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) \
     /**/ i(entity, frag_attacker) \
     /**/ i(entity, frag_target) \
     /**/ i(float, frag_deathtype) \