]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Never allow spawning hidden monsters, anyrandom instead allows spawning passive monsters
authorMario <mario@smbclan.net>
Thu, 12 Apr 2018 14:10:39 +0000 (00:10 +1000)
committerMario <mario@smbclan.net>
Thu, 12 Apr 2018 14:10:39 +0000 (00:10 +1000)
qcsrc/common/monsters/sv_spawn.qc
qcsrc/server/command/common.qc

index d6989ad31839d52229cc8f612879fd6c83ab8686..c2d6fd3f4e72bfccf3144c1019eef0af1d8612d4 100644 (file)
@@ -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);
                });
index 2f7467eab7bac87ff6191a004bac3c568d4efa70..db822eb71f7ea45e2536677da8f50aab4d071bcf 100644 (file)
@@ -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);