X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fcommon%2Fmonsters%2Fsv_spawn.qc;h=d456282d429ee6fbc6c5113f90b7f57484b8fcff;hp=497dee86664b54d644f405e4be5ea47fc01969e9;hb=38c2e33f2b643b4e9d1878ceb3330cc05406edcc;hpb=26693a3ac060825ce6c7f170d4e65f7ac2a1fb25 diff --git a/qcsrc/common/monsters/sv_spawn.qc b/qcsrc/common/monsters/sv_spawn.qc index 497dee866..d456282d4 100644 --- a/qcsrc/common/monsters/sv_spawn.qc +++ b/qcsrc/common/monsters/sv_spawn.qc @@ -16,11 +16,12 @@ entity spawnmonster (entity e, string monster, int monster_id, entity spawnedby, //if(invincible) { e.spawnflags |= MONSTERFLAG_INVINCIBLE; } setorigin(e, orig); + bool allow_any = boolean(monster == "anyrandom"); - if(monster == "random") + if(monster == "random" || allow_any) { - RandomSelection_Init(); - FOREACH(Monsters, it != MON_Null && !(it.spawnflags & MONSTER_TYPE_PASSIVE), + RandomSelection_Init(); + FOREACH(Monsters, it != MON_Null && (allow_any || !(it.spawnflags & MON_FLAG_HIDDEN)) && !(it.spawnflags & MONSTER_TYPE_PASSIVE), { RandomSelection_AddEnt(it, 1, 1); });