]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix barrel death message and assault objectives
authorMario <mario@smbclan.net>
Tue, 13 Oct 2015 22:23:49 +0000 (08:23 +1000)
committerMario <mario@smbclan.net>
Tue, 13 Oct 2015 22:23:49 +0000 (08:23 +1000)
qcsrc/common/triggers/func/breakable.qc

index 9fda071fd4f005d58870c5d4348361d2c6a278fa..4164f8341ac8feaa2969f18a879d635ae7433676 100644 (file)
@@ -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;
        }
 }