diff --git a/Source/diablo.cpp b/Source/diablo.cpp index 98c16ec4e..1633a6155 100644 --- a/Source/diablo.cpp +++ b/Source/diablo.cpp @@ -65,6 +65,7 @@ bool debug_mode_key_inverted_v = false; bool debug_mode_dollar_sign = false; bool debug_mode_key_d = false; bool debug_mode_key_i = false; +int debug_mode_key_j = 0; int arrowdebug = 0; #endif /** Specifies whether players are in non-PvP mode. */ @@ -115,7 +116,7 @@ static void print_help_and_exit() printInConsole(" %-20s %-30s\n", "-^", "Enable god mode and debug tools"); printInConsole(" %-20s %-30s\n", "-v", "Highlight visibility"); printInConsole(" %-20s %-30s\n", "-i", "Ignore network timeout"); - //printInConsole(" %-20s %-30s\n", "-j <##>", "Init trigger at level"); + printInConsole(" %-20s %-30s\n", "-j <##>", "Mausoleum warps to given level"); printInConsole(" %-20s %-30s\n", "-l <##> <##>", "Start in level as type"); printInConsole(" %-20s %-30s\n", "-m <##>", "Add debug monster, up to 10 allowed"); printInConsole(" %-20s %-30s\n", "-q <#>", "Force a certain quest"); @@ -163,10 +164,8 @@ static void diablo_parse_flags(int argc, char **argv) debug_mode_key_d = true; } else if (strcasecmp("-i", argv[i]) == 0) { debug_mode_key_i = true; - /* } else if (strcasecmp("-j", argv[i]) == 0) { - debug_mode_key_J_trigger = argv[++i]; - */ + debug_mode_key_j = SDL_atoi(argv[++i]); } else if (strcasecmp("-l", argv[i]) == 0) { setlevel = FALSE; leveldebug = true; diff --git a/Source/diablo.h b/Source/diablo.h index bca209f78..fcc4e45ae 100644 --- a/Source/diablo.h +++ b/Source/diablo.h @@ -171,6 +171,7 @@ extern bool debug_mode_key_inverted_v; extern bool debug_mode_dollar_sign; extern bool debug_mode_key_d; extern bool debug_mode_key_i; +extern int debug_mode_key_j; #endif extern bool gbFriendlyMode; extern bool gbFriendlyFire; diff --git a/Source/trigs.cpp b/Source/trigs.cpp index 27a3a7dda..423425dcf 100644 --- a/Source/trigs.cpp +++ b/Source/trigs.cpp @@ -77,6 +77,8 @@ void InitTownTriggers() trigs[numtrigs]._ty = 21; trigs[numtrigs]._tmsg = WM_DIABTOWNWARP; trigs[numtrigs]._tlvl = 5; + if (debug_mode_key_j) + trigs[numtrigs]._tlvl = debug_mode_key_j; numtrigs++; } if (gbIsMultiplayer || plr[myplr].pTownWarps & 2 || (gbIsHellfire && plr[myplr]._pLevel >= 15)) {