]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/triggers/trigger/swamp.qc
Rename PHYS_DEAD to IS_DEAD and make it usable outside of player physics
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / triggers / trigger / swamp.qc
index 768a3c78b9a94ffccd33b06c01b78d5181dcd4f8..ad9c872dae6a4e17f3d233390186045539d16850 100644 (file)
@@ -1,10 +1,10 @@
 #if defined(CSQC)
 #elif defined(MENUQC)
 #elif defined(SVQC)
-    #include "../../../lib/warpzone/util_server.qh"
-    #include "../../weapons/all.qh"
-    #include "../../../server/defs.qh"
-    #include "../../deathtypes/all.qh"
+    #include <lib/warpzone/util_server.qh>
+    #include <common/weapons/all.qh>
+    #include <server/defs.qh>
+    #include <common/deathtypes/all.qh>
 #endif
 
 /*
@@ -64,7 +64,7 @@ void swamp_touch()
 {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))
+       if(!IS_PLAYER(other) || IS_DEAD(other))
                return;
 
        EXACTTRIGGER_TOUCH;
@@ -99,18 +99,18 @@ float swamp_send(entity this, entity to, float sf)
 {
        WriteHeader(MSG_ENTITY, ENT_CLIENT_SWAMP);
 
-       WriteByte(MSG_ENTITY, self.dmg); // can probably get away with using a single byte here
-       WriteByte(MSG_ENTITY, self.swamp_slowdown);
-       WriteByte(MSG_ENTITY, self.swamp_interval);
+       WriteByte(MSG_ENTITY, this.dmg); // can probably get away with using a single byte here
+       WriteByte(MSG_ENTITY, this.swamp_slowdown);
+       WriteByte(MSG_ENTITY, this.swamp_interval);
 
-       trigger_common_write(false);
+       trigger_common_write(this, false);
 
        return true;
 }
 
 void swamp_link()
 {SELFPARAM();
-       Net_LinkEntity(self, false, 0, swamp_send);
+       trigger_link(self, swamp_send);
 }
 
 /*QUAKED spawnfunc_trigger_swamp (.5 .5 .5) ?
@@ -120,7 +120,7 @@ get slowd down and damaged
 spawnfunc(trigger_swamp)
 {
        // Init stuff
-       EXACTTRIGGER_INIT;
+       trigger_init(self);
        self.touch = swamp_touch;
 
        // Setup default keys, if missing