]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Add another potentially useful hook
authorMario <mario@smbclan.net>
Wed, 28 Oct 2015 07:08:32 +0000 (17:08 +1000)
committerMario <mario@smbclan.net>
Wed, 28 Oct 2015 07:08:32 +0000 (17:08 +1000)
qcsrc/server/mutators/events.qh
qcsrc/server/weapons/common.qc

index 50021ae2d4042b9bae1ae626bc05e37157928e6b..8bbe6fb0552279a0cf2fc3c4ba376ac97a35f963 100644 (file)
@@ -813,4 +813,11 @@ MUTATOR_HOOKABLE(TurretValidateTarget, EV_TurretValidateTarget);
 MUTATOR_HOOKABLE(TurretThink, EV_TurretThink);
 
 MUTATOR_HOOKABLE(Ent_Init, EV_NO_ARGS);
+
+/** */
+#define EV_PrepareExplosionByDamage(i, o) \
+    /**/ i(entity, __self) \
+    /**/ i(entity, frag_attacker) \
+    /**/
+MUTATOR_HOOKABLE(PrepareExplosionByDamage, EV_PrepareExplosionByDamage);
 #endif
index 5a5e30bf79c11c92cd217c5e006bf0d399a92c73..ef3d185c03e64f63ba6ab6474b66cb054bbc3789 100644 (file)
@@ -89,6 +89,8 @@ void W_PrepareExplosionByDamage(entity attacker, void() explode)
                self.realowner = attacker;
        }
 
+       MUTATOR_CALLHOOK(PrepareExplosionByDamage, self, attacker);
+
        // do not explode NOW but in the NEXT FRAME!
        // because recursive calls to RadiusDamage are not allowed
        self.nextthink = time;