From: Mario Date: Tue, 13 Oct 2015 22:23:49 +0000 (+1000) Subject: Fix barrel death message and assault objectives X-Git-Tag: xonotic-v0.8.2~1826 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=3f070f1a75968b0912f7c203e7888f1661d31764;p=xonotic%2Fxonotic-data.pk3dir.git Fix barrel death message and assault objectives --- 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; } }