From: Mario Date: Thu, 12 Apr 2018 14:10:39 +0000 (+1000) Subject: Never allow spawning hidden monsters, anyrandom instead allows spawning passive monsters X-Git-Tag: xonotic-v0.8.5~2189 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=41396c33b0c38cd231af7d1eeb037d3d1aa507b7;p=xonotic%2Fxonotic-data.pk3dir.git Never allow spawning hidden monsters, anyrandom instead allows spawning passive monsters --- diff --git a/qcsrc/common/monsters/sv_spawn.qc b/qcsrc/common/monsters/sv_spawn.qc index d6989ad31..c2d6fd3f4 100644 --- a/qcsrc/common/monsters/sv_spawn.qc +++ b/qcsrc/common/monsters/sv_spawn.qc @@ -21,7 +21,7 @@ entity spawnmonster (entity e, string monster, int monster_id, entity spawnedby, if(monster == "random" || allow_any) { RandomSelection_Init(); - FOREACH(Monsters, it != MON_Null && (allow_any || (!(it.spawnflags & MONSTER_TYPE_PASSIVE) && !(it.spawnflags & MON_FLAG_HIDDEN))), + FOREACH(Monsters, it != MON_Null && (allow_any || !(it.spawnflags & MONSTER_TYPE_PASSIVE)) && !(it.spawnflags & MON_FLAG_HIDDEN), { RandomSelection_AddEnt(it, 1, 1); }); diff --git a/qcsrc/server/command/common.qc b/qcsrc/server/command/common.qc index 2f7467eab..db822eb71 100644 --- a/qcsrc/server/command/common.qc +++ b/qcsrc/server/command/common.qc @@ -391,7 +391,7 @@ void CommonCommand_editmob(int request, entity caller, int argc) break; }); - if (!found && arg_lower != "random") { print_to(caller, "Invalid monster"); return; } + if (!found && arg_lower != "random" && arg_lower != "anyrandom") { print_to(caller, "Invalid monster"); return; } totalspawned += 1; WarpZone_TraceBox(CENTER_OR_VIEWOFS(caller), caller.mins, caller.maxs, CENTER_OR_VIEWOFS(caller) + v_forward * 150, true, caller);