]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Don't spawn passive monsters if random is chosen
authorMario <mario@smbclan.net>
Wed, 19 Oct 2016 19:44:45 +0000 (05:44 +1000)
committerMario <mario@smbclan.net>
Wed, 19 Oct 2016 19:44:45 +0000 (05:44 +1000)
qcsrc/common/monsters/sv_spawn.qc

index 9e87e488e624323d336ee9cfcedb36ec651b1ba9..8c658252071977f014458e29dff9d1f71c54205e 100644 (file)
@@ -22,7 +22,7 @@ entity spawnmonster (string monster, int monster_id, entity spawnedby, entity ow
        if(monster == "random")
        {
                RandomSelection_Init(); 
-               FOREACH(Monsters, it != MON_Null,
+               FOREACH(Monsters, it != MON_Null && !(it.spawnflags & MONSTER_TYPE_PASSIVE),
                {
                        RandomSelection_AddEnt(it, 1, 1);
                });