]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Don't spawn monsters if no spawnpoint was found
authorMario <mario.mario@y7mail.com>
Fri, 1 Mar 2013 10:01:06 +0000 (21:01 +1100)
committerMario <mario.mario@y7mail.com>
Fri, 1 Mar 2013 10:01:06 +0000 (21:01 +1100)
qcsrc/server/mutators/gamemode_td.qc

index 1458d78869fa2c1d23c45b32a298b90524a4b6ff..17dcd57ca7707150dda1f052ad3525a516d60094 100644 (file)
@@ -371,6 +371,12 @@ void TD_SpawnMonster(string mnster, string strngth, string type)
        
        if(e == world)
                e = PickSpawn("monster_swarm", "");
+               
+       if(e == world)
+       {
+               print("Warning: couldn't find any spawns, no monsters will spawn!\n");
+               return;
+       }
   
        mon = spawnmonster(mnster, e, e, e.origin, FALSE, 0);
        mon.target = e.target;