]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/command/common.qc
Use monster definitions directly instead of a set ID, reduces registry calls needed...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / command / common.qc
index f791446eb5872a8b0a6fb37807d430bc9aa594d0..32ccd883e97d28d0ebbce901bdd67cf8e2b4399d 100644 (file)
@@ -395,7 +395,7 @@ void CommonCommand_editmob(int request, entity caller, int argc)
 
                                        totalspawned += 1;
                                        WarpZone_TraceBox(CENTER_OR_VIEWOFS(caller), caller.mins, caller.maxs, CENTER_OR_VIEWOFS(caller) + v_forward * 150, true, caller);
-                                       mon = spawnmonster(spawn(), arg_lower, 0, caller, caller, trace_endpos, false, false, moveflag);
+                                       mon = spawnmonster(spawn(), arg_lower, MON_Null, caller, caller, trace_endpos, false, false, moveflag);
                                        print_to(caller, strcat("Spawned ", mon.monster_name));
                                        return;
                                }
@@ -416,7 +416,7 @@ void CommonCommand_editmob(int request, entity caller, int argc)
                                        if (!autocvar_g_monsters_edit) { print_to(caller, "Monster editing is disabled"); return; }
                                        if (!is_visible) { print_to(caller, "You must look at your monster to edit it"); return; }
                                        if (mon.realowner != caller && autocvar_g_monsters_edit < 2) { print_to(caller, "This monster does not belong to you"); return; }
-                                       if (mon.monsterid == MON_MAGE.monsterid) { print_to(caller, "Mage skins can't be changed"); return; }  // TODO
+                                       if (mon.monsterdef == MON_MAGE) { print_to(caller, "Mage skins can't be changed"); return; }  // TODO
 
                                        mon.skin = stof(argument);
                                        print_to(caller, strcat("Monster skin successfully changed to ", ftos(mon.skin)));