]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/monsters/lib/spawn.qc
Use IS_PLAYER & IS_SPEC instead of classname checks
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / monsters / lib / spawn.qc
index bb707b3eaedf801a2b4450df815333046eb78151..d9d68f1c65a7db8609cce9e002de6fecfefa88a7 100644 (file)
@@ -12,8 +12,9 @@ entity spawnmonster (string monster, entity spawnedby, entity own, vector orig,
 {
        if not(autocvar_g_monsters)
        {
-               if(spawnedby.flags & FL_CLIENT)
-                       sprint(spawnedby, "Monsters are disabled. Enable g_monsters to spawn monsters\n");
+               if(IS_CLIENT(spawnedby))
+                       Send_Notification(NOTIF_ONE, spawnedby, MSG_INFO, INFO_MONSTERS_DISABLED);
+                       
                return world;
        }
        
@@ -45,7 +46,7 @@ entity spawnmonster (string monster, entity spawnedby, entity own, vector orig,
        
        if (spawnedby.classname == "monster_swarm")
                e.monster_owner = own;  
-       else if(spawnedby.flags & FL_CLIENT)
+       else if(IS_CLIENT(spawnedby))
        {
                if(teamplay && autocvar_g_monsters_teams)
                        e.team = spawnedby.team; // colors handled in spawn code