const int MONSTER_SIZE_QUAKE = BIT(13);
const int MONSTER_TYPE_PASSIVE = BIT(14); // doesn't target or chase enemies
const int MONSTER_TYPE_UNDEAD = BIT(15); // monster is by most definitions a zombie (doesn't fully die unless gibbed)
+const int MON_FLAG_HIDDEN = BIT(16);
// entity properties of monsterinfo:
.bool(int, entity actor, entity targ, .entity weaponentity) monster_attackfunc;
if(monster == "random")
{
RandomSelection_Init();
- FOREACH(Monsters, it != MON_Null && !(it.spawnflags & MONSTER_TYPE_PASSIVE),
+ FOREACH(Monsters, it != MON_Null && !(it.spawnflags & MONSTER_TYPE_PASSIVE) && !(it.spawnflags & MON_FLAG_HIDDEN),
{
RandomSelection_AddEnt(it, 1, 1);
});
{
string monsterlist = "";
- FOREACH(Monsters, it != MON_Null,
+ FOREACH(Monsters, it != MON_Null && !(it.spawnflags & MON_FLAG_HIDDEN),
{
string col = ((i % 2) ? "^2" : "^3");
monsterlist = sprintf("%s%s%s ", monsterlist, col, it.netname);
FOREACH(Monsters, it != MON_Null,
{
- if((it.spawnflags & MONSTER_TYPE_PASSIVE) || (it.spawnflags & MONSTER_TYPE_FLY) || (it.spawnflags & MONSTER_TYPE_SWIM) || (it.spawnflags & MONSTER_SIZE_QUAKE) || ((it.spawnflags & MON_FLAG_SUPERMONSTER) && supermonster_count >= 1))
+ if((it.spawnflags & MON_FLAG_HIDDEN) || (it.spawnflags & MONSTER_TYPE_PASSIVE) || (it.spawnflags & MONSTER_TYPE_FLY) || (it.spawnflags & MONSTER_TYPE_SWIM) ||
+ (it.spawnflags & MONSTER_SIZE_QUAKE) || ((it.spawnflags & MON_FLAG_SUPERMONSTER) && supermonster_count >= 1))
continue;
if(autocvar_g_invasion_zombies_only && !(it.spawnflags & MONSTER_TYPE_UNDEAD))
continue;