#ifdef SVQC
-#include "../../../server/_all.qh"
-
#include "../../../server/g_subs.qh"
#include "../../../server/g_damage.qh"
#include "../../../server/bot/bot.qh"
#include "../../../common/csqcmodel_settings.qh"
-#include "../../../csqcmodellib/sv_model.qh"
+#include "../../../lib/csqcmodel/sv_model.qh"
#include "../../../server/weapons/common.qh"
.entity sprite;
_sound (self, CH_TRIGGER, self.noise, VOL_BASE, ATTEN_NORM);
if(self.dmg)
- RadiusDamage(self, activator, self.dmg, self.dmg_edge, self.dmg_radius, self, world, self.dmg_force, DEATH_HURTTRIGGER, world);
+ RadiusDamage(self, activator, self.dmg, self.dmg_edge, self.dmg_radius, self, world, self.dmg_force, DEATH_HURTTRIGGER.m_id, world);
if(self.cnt) // TODO
pointparticles(self.cnt, self.absmin * 0.5 + self.absmax * 0.5, '0 0 0', self.count);
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;
}
}