From 3f070f1a75968b0912f7c203e7888f1661d31764 Mon Sep 17 00:00:00 2001 From: Mario Date: Wed, 14 Oct 2015 08:23:49 +1000 Subject: [PATCH] Fix barrel death message and assault objectives --- qcsrc/common/triggers/func/breakable.qc | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/qcsrc/common/triggers/func/breakable.qc b/qcsrc/common/triggers/func/breakable.qc index 9fda071fd..4164f8341 100644 --- a/qcsrc/common/triggers/func/breakable.qc +++ b/qcsrc/common/triggers/func/breakable.qc @@ -247,7 +247,20 @@ void func_breakable_damage(entity inflictor, entity attacker, float damage, int if(self.health <= 0) { debrisforce = force; - W_PrepareExplosionByDamage(attacker, func_breakable_destroy); + + self.takedamage = DAMAGE_NO; + self.event_damage = func_null; + + if(IS_CLIENT(attacker) && self.classname == "func_assault_destructible") + { + self.owner = attacker; + self.realowner = attacker; + } + + // do not explode NOW but in the NEXT FRAME! + // because recursive calls to RadiusDamage are not allowed + self.nextthink = time; + self.think = func_breakable_destroy; } } -- 2.39.2