From: Mario Date: Wed, 28 Oct 2015 07:08:32 +0000 (+1000) Subject: Add another potentially useful hook X-Git-Tag: xonotic-v0.8.2~1768 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=ef4d99ce968a2c6db27c0e28133d178ddbf4eba4;p=xonotic%2Fxonotic-data.pk3dir.git Add another potentially useful hook --- diff --git a/qcsrc/server/mutators/events.qh b/qcsrc/server/mutators/events.qh index 50021ae2d..8bbe6fb05 100644 --- a/qcsrc/server/mutators/events.qh +++ b/qcsrc/server/mutators/events.qh @@ -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 diff --git a/qcsrc/server/weapons/common.qc b/qcsrc/server/weapons/common.qc index 5a5e30bf7..ef3d185c0 100644 --- a/qcsrc/server/weapons/common.qc +++ b/qcsrc/server/weapons/common.qc @@ -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;