diff --git a/Source/diablo.cpp b/Source/diablo.cpp index b7852caa7..85955764c 100644 --- a/Source/diablo.cpp +++ b/Source/diablo.cpp @@ -101,9 +101,6 @@ std::array quickSpellActionIndexes; bool gbForceWindowed = false; #ifdef _DEBUG -bool monstdebug = false; -_monster_id DebugMonsters[10]; -int debugmonsttypes = 0; bool debug_mode_key_inverted_v = false; bool debug_mode_key_i = false; std::vector DebugCmdsFromCommandLine; @@ -817,7 +814,6 @@ void RunGameLoop(interface_mode uMsg) printInConsole("\nDebug options:\n"); printInConsole(" %-20s %-30s\n", "-^", "Enable debug tools"); printInConsole(" %-20s %-30s\n", "-i", "Ignore network timeout"); - printInConsole(" %-20s %-30s\n", "-m <##>", "Add debug monster, up to 10 allowed"); printInConsole(" %-20s %-30s\n", "+", "Pass commands to the engine"); #endif printInConsole("%s", _("\nReport bugs at https://github.com/diasurgical/devilutionX/\n")); @@ -879,9 +875,6 @@ void DiabloParseFlags(int argc, char **argv) debug_mode_key_inverted_v = true; } else if (strcasecmp("-i", argv[i]) == 0) { debug_mode_key_i = true; - } else if (strcasecmp("-m", argv[i]) == 0) { - monstdebug = true; - DebugMonsters[debugmonsttypes++] = (_monster_id)SDL_atoi(argv[++i]); } else if (argv[i][0] == '+') { if (!currentCommand.empty()) DebugCmdsFromCommandLine.push_back(currentCommand); diff --git a/Source/diablo.h b/Source/diablo.h index cf62d8d54..59e010962 100644 --- a/Source/diablo.h +++ b/Source/diablo.h @@ -106,9 +106,6 @@ void diablo_color_cyc_logic(); extern Keymapper keymapper; extern bool gbForceWindowed; #ifdef _DEBUG -extern bool monstdebug; -extern _monster_id DebugMonsters[10]; -extern int debugmonsttypes; extern bool debug_mode_key_inverted_v; extern bool debug_mode_key_i; #endif diff --git a/Source/monster.cpp b/Source/monster.cpp index a747e37c1..9fa6676ff 100644 --- a/Source/monster.cpp +++ b/Source/monster.cpp @@ -3642,29 +3642,20 @@ void GetLevelMTypes() } } -#ifdef _DEBUG - if (monstdebug) { - for (int i = 0; i < debugmonsttypes; i++) - AddMonsterType(DebugMonsters[i], PLACE_SCATTER); - } else -#endif - { - - while (nt > 0 && LevelMonsterTypeCount < MAX_LVLMTYPES && monstimgtot < 4000) { - for (int i = 0; i < nt;) { - if (MonstersData[typelist[i]].mImage > 4000 - monstimgtot) { - typelist[i] = typelist[--nt]; - continue; - } - - i++; - } - - if (nt != 0) { - int i = GenerateRnd(nt); - AddMonsterType(typelist[i], PLACE_SCATTER); + while (nt > 0 && LevelMonsterTypeCount < MAX_LVLMTYPES && monstimgtot < 4000) { + for (int i = 0; i < nt;) { + if (MonstersData[typelist[i]].mImage > 4000 - monstimgtot) { typelist[i] = typelist[--nt]; + continue; } + + i++; + } + + if (nt != 0) { + int i = GenerateRnd(nt); + AddMonsterType(typelist[i], PLACE_SCATTER); + typelist[i] = typelist[--nt]; } }