]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/bot/navigation.qc
Replace all player/bot/spectator classname checks with macros
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / bot / navigation.qc
index a5c60e3935bca171b1e16e30971d2b34997141cd..4663d8d9c404c0e55ea191975500890c06860a46 100644 (file)
@@ -923,7 +923,7 @@ void navigation_poptouchedgoals()
 
        // HACK: remove players/bots as goals, they can lead a bot to unexpected places (cliffs, lava, etc)
        // TODO: rate waypoints near the targetted player at that moment, instead of the player itself
-       if(self.goalcurrent.classname=="player")
+       if(IS_PLAYER(self.goalcurrent))
                navigation_poproute();
 
        // aid for detecting jump pads better (distance based check fails sometimes)
@@ -1141,7 +1141,7 @@ void debugresetnodes()
 
 void debugnode(vector node)
 {
-       if not(self.classname=="player")
+       if not(IS_PLAYER(self))
                return;
 
        if(debuglastnode=='0 0 0')