]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/triggers/trigger/swamp.qc
Merge branch 'master' into TimePath/deathtypes
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / triggers / trigger / swamp.qc
index 7f1bb892c3e254ed538ec1ce87e748f9203e4f65..a906fcd313d53f21eaac86df915fd429bf418491 100644 (file)
@@ -1,12 +1,10 @@
 #if defined(CSQC)
 #elif defined(MENUQC)
 #elif defined(SVQC)
-       #include "../../../server/_all.qh"
-       #include "../../../dpdefs/progsdefs.qh"
-    #include "../../../warpzonelib/util_server.qh"
+    #include "../../../lib/warpzone/util_server.qh"
     #include "../../weapons/all.qh"
     #include "../../../server/defs.qh"
-    #include "../../deathtypes.qh"
+    #include "../../deathtypes/all.qh"
 #endif
 
 /*
@@ -22,7 +20,7 @@
 .entity swampslug;
 
 #ifdef SVQC
-void spawnfunc_trigger_swamp(void);
+spawnfunc(trigger_swamp);
 #endif
 void swamp_touch(void);
 void swampslug_think();
@@ -39,7 +37,7 @@ void swampslug_think();
 * I do it this way becuz there is no "untouch" event.
 */
 void swampslug_think(void)
-{
+{SELFPARAM();
        //Slowly kill the slug
        self.health = self.health - 1;
 
@@ -56,14 +54,14 @@ void swampslug_think(void)
        // Or we have exited it very recently.
        // Do the damage and renew the timer.
 #ifdef SVQC
-       Damage (self.owner, self, self, self.dmg, DEATH_SWAMP, other.origin, '0 0 0');
+       Damage (self.owner, self, self, self.dmg, DEATH_SWAMP.m_id, other.origin, '0 0 0');
 #endif
 
        self.nextthink = time + self.swamp_interval;
 }
 
 void swamp_touch(void)
-{
+{SELFPARAM();
        // If whatever thats touching the swamp is not a player
        // or if its a dead player, just dont care abt it.
        if(!IS_PLAYER(other) || PHYS_DEAD(other))
@@ -96,7 +94,7 @@ void swamp_touch(void)
 
 #ifdef SVQC
 float swamp_send(entity to, float sf)
-{
+{SELFPARAM();
        WriteByte(MSG_ENTITY, ENT_CLIENT_LADDER);
 
        WriteByte(MSG_ENTITY, self.dmg); // can probably get away with using a single byte here
@@ -109,7 +107,7 @@ float swamp_send(entity to, float sf)
 }
 
 void swamp_link()
-{
+{SELFPARAM();
        Net_LinkEntity(self, false, 0, func_ladder_send);
 }
 
@@ -117,7 +115,7 @@ void swamp_link()
 Players gettin into the swamp will
 get slowd down and damaged
 */
-void spawnfunc_trigger_swamp(void)
+spawnfunc(trigger_swamp)
 {
        // Init stuff
        EXACTTRIGGER_INIT;
@@ -137,7 +135,7 @@ void spawnfunc_trigger_swamp(void)
 #elif defined(CSQC)
 
 void ent_swamp()
-{
+{SELFPARAM();
        self.dmg = ReadByte();
        self.swamp_slowdown = ReadByte();
        self.swamp_interval = ReadByte();