]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/triggers/func/breakable.qc
Merge branch 'master' into TimePath/deathtypes
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / triggers / func / breakable.qc
index 0430db2d4104e49901f32b80549e144f8fcba45c..9fda071fd4f005d58870c5d4348361d2c6a278fa 100644 (file)
@@ -1,12 +1,10 @@
 #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;
@@ -162,7 +160,7 @@ void func_breakable_behave_restore()
        self.nextthink = 0; // cancel auto respawn
        func_breakable_colormod();
        if (self.noise1)
-               sound (self, CH_TRIGGER_SINGLE, self.noise1, VOL_BASE, ATTEN_NORM);
+               _sound (self, CH_TRIGGER_SINGLE, self.noise1, VOL_BASE, ATTEN_NORM);
 }
 
 void func_breakable_init_for_player(entity player)
@@ -207,10 +205,10 @@ void func_breakable_destroy()
        func_breakable_destroyed();
 
        if(self.noise)
-               sound (self, CH_TRIGGER, self.noise, VOL_BASE, ATTEN_NORM);
+               _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);
@@ -266,8 +264,8 @@ void func_breakable_reset()
 }
 
 // destructible walls that can be used to trigger target_objective_decrease
-void spawnfunc_func_breakable()
-{SELFPARAM();
+spawnfunc(func_breakable)
+{
        float n, i;
        if(!self.health)
                self.health = 100;
@@ -335,7 +333,7 @@ void spawnfunc_func_breakable()
 }
 
 // for use in maps with a "model" key set
-void spawnfunc_misc_breakablemodel() {
-       spawnfunc_func_breakable();
+spawnfunc(misc_breakablemodel) {
+       spawnfunc_func_breakable(this);
 }
 #endif