]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/t_items.qc
Replace all player/bot/spectator classname checks with macros
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / t_items.qc
index bf70da0286a837b98fb68fb2adbff927f8d30254..407962ae6adbb61e0894e493dbcf6750feef779a 100644 (file)
@@ -627,7 +627,7 @@ float Item_GiveTo(entity item, entity player)
                        _switchweapon = TRUE;
 
                        // play some cool sounds ;)
-                       if (clienttype(player) == CLIENTTYPE_REAL)
+                       if (IS_REAL_CLIENT(player))
                        {
                                if(player.health <= 5)
                                        AnnounceTo(player, "lastsecond");
@@ -766,7 +766,7 @@ void Item_Touch (void)
                }
        }
 
-       if (other.classname != "player")
+       if not(IS_PLAYER(other))
                return;
        if (other.deadflag)
                return;
@@ -1680,7 +1680,7 @@ void target_items_use (void)
                return;
        }
 
-       if(activator.classname != "player")
+       if not(IS_PLAYER(activator))
                return;
        if(activator.deadflag != DEAD_NO)
                return;