]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/t_items.qc
Merge branch 'master' into Mario/classname_checks
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / t_items.qc
index 2ff925ca53d9fbf2ac2c05c103b85e4a0402e263..49a1cb3b5dca6cf84629950a0be1cff54f894c29 100644 (file)
@@ -627,12 +627,12 @@ 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");
+                                       Send_Notification(NOTIF_ONE, player, MSG_ANNCE, ANNCE_MINSTAGIB_LASTSECOND);
                                else if(player.health < 50)
-                                       AnnounceTo(player, "narrowly");
+                                       Send_Notification(NOTIF_ONE, player, MSG_ANNCE, ANNCE_MINSTAGIB_NARROWLY);
                        }
                        // sound not available
                        // else if(item.items == IT_CELLS)
@@ -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;