]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/triggers/teleporters.qc
Rename PHYS_DEAD to IS_DEAD and make it usable outside of player physics
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / triggers / teleporters.qc
index 0ddc833103f2050e6abf046fa5b06a002f176e19..1050f8ebdbcf905bd372968f204ed0c811030732 100644 (file)
@@ -3,26 +3,26 @@
 #if defined(CSQC)
 #elif defined(MENUQC)
 #elif defined(SVQC)
-    #include "../../lib/warpzone/common.qh"
-    #include "../../lib/warpzone/util_server.qh"
-    #include "../../lib/warpzone/server.qh"
+    #include <lib/warpzone/common.qh>
+    #include <lib/warpzone/util_server.qh>
+    #include <lib/warpzone/server.qh>
     #include "../constants.qh"
        #include "../triggers/subs.qh"
     #include "../util.qh"
-    #include "../../server/weapons/csqcprojectile.qh"
-    #include "../../server/autocvars.qh"
-    #include "../../server/constants.qh"
-    #include "../../server/defs.qh"
+    #include <server/weapons/csqcprojectile.qh>
+    #include <server/autocvars.qh>
+    #include <server/constants.qh>
+    #include <server/defs.qh>
     #include "../deathtypes/all.qh"
     #include "../turrets/sv_turrets.qh"
     #include "../vehicles/all.qh"
     #include "../mapinfo.qh"
-    #include "../../server/anticheat.qh"
+    #include <server/anticheat.qh>
 #endif
 
 float check_tdeath(entity player, vector org, vector telefragmin, vector telefragmax)
 {
-       if (IS_PLAYER(player) && !PHYS_DEAD(player))
+       if (IS_PLAYER(player) && !IS_DEAD(player))
        {
                TDEATHLOOP(org)
                {
@@ -30,7 +30,7 @@ float check_tdeath(entity player, vector org, vector telefragmin, vector telefra
                        if (!(teamplay && autocvar_g_telefrags_teamplay && head.team == player.team))
                #endif
                                if(IS_PLAYER(head))
-                                       if(!PHYS_DEAD(head))
+                                       if(!IS_DEAD(head))
                                                return 1;
                }
        }
@@ -138,7 +138,7 @@ void TeleportPlayer(entity teleporter, entity player, vector to, vector to_angle
                                tdeath(player, teleporter, telefragger, telefragmin, telefragmax);
 
                // player no longer is on ground
-               player.flags &= ~FL_ONGROUND;
+               UNSET_ONGROUND(player);
 
                // reset tracking of oldvelocity for impact damage (sudden velocity changes)
                player.oldvelocity = player.velocity;