3232#include " Common/version.h"
3333#include " GameClient/TerrainVisual.h" // for TERRAIN_LOD_MIN definition
3434#include " GameClient/GameText.h"
35+ #include " GameNetwork/NetworkDefs.h"
3536
3637Bool TheDebugIgnoreSyncErrors = FALSE ;
3738extern Int DX8Wrapper_PreserveFPU;
@@ -103,9 +104,7 @@ static void ConvertShortMapPathToLongMapPath(AsciiString &mapName)
103104// =============================================================================
104105Int parseNoLogOrCrash (char *args[], int )
105106{
106- #ifdef ALLOW_DEBUG_UTILS
107107 DEBUG_CRASH ((" -NoLogOrCrash not supported in this build\n " ));
108- #endif
109108 return 1 ;
110109}
111110
@@ -325,7 +324,9 @@ Int parseNoDraw(char *args[], int argc)
325324// =============================================================================
326325Int parseLogToConsole (char *args[], int )
327326{
327+ #ifdef ALLOW_DEBUG_UTILS
328328 DebugSetFlags (DebugGetFlags () | DEBUG_FLAG_LOG_TO_CONSOLE);
329+ #endif
329330 return 1 ;
330331}
331332
@@ -950,7 +951,7 @@ Int parseBenchmark(char *args[], int num)
950951}
951952#endif
952953
953- #if defined(_DEBUG) || defined(_INTERNAL)
954+ #ifdef DEBUG_CRASHING
954955Int parseIgnoreAsserts (char *args[], int num)
955956{
956957 if (TheWritableGlobalData && num > 0 )
@@ -961,7 +962,7 @@ Int parseIgnoreAsserts(char *args[], int num)
961962}
962963#endif
963964
964- #if defined(_DEBUG) || defined(_INTERNAL)
965+ #ifdef DEBUG_STACKTRACE
965966Int parseIgnoreStackTrace (char *args[], int num)
966967{
967968 if (TheWritableGlobalData && num > 0 )
@@ -1058,7 +1059,7 @@ Int parseMod(char *args[], Int num)
10581059 return 1 ;
10591060}
10601061
1061- #if defined(_DEBUG) || defined(_INTERNAL)
1062+ #ifdef DEBUG_LOGGING
10621063Int parseSetDebugLevel (char *args[], int num)
10631064{
10641065 if (num > 1 )
@@ -1113,7 +1114,6 @@ static CommandLineParam params[] =
11131114 { " -novideo" , parseNoVideo },
11141115 { " -noLogOrCrash" , parseNoLogOrCrash },
11151116 { " -FPUPreserve" , parseFPUPreserve },
1116- #if defined(_DEBUG) || defined(_INTERNAL)
11171117 { " -benchmark" , parseBenchmark },
11181118 { " -saveStats" , parseSaveStats },
11191119 { " -localMOTD" , parseLocalMOTD },
@@ -1161,16 +1161,11 @@ static CommandLineParam params[] =
11611161 { " -netMinPlayers" , parseNetMinPlayers },
11621162 { " -DemoLoadScreen" , parseDemoLoadScreen },
11631163 { " -cameraDebug" , parseCameraDebug },
1164- { " -ignoreAsserts" , parseIgnoreAsserts },
1165- { " -ignoreStackTrace" , parseIgnoreStackTrace },
11661164 { " -logToCon" , parseLogToConsole },
11671165 { " -vTune" , parseVTune },
11681166 { " -selectTheUnselectable" , parseSelectAll },
11691167 { " -RunAhead" , parseRunAhead },
11701168 { " -noshroud" , parseNoShroud },
1171- { " -setDebugLevel" , parseSetDebugLevel },
1172- { " -clearDebugLevel" , parseClearDebugLevel },
1173- #endif
11741169 { " -forceBenchmark" , parseForceBenchmark },
11751170 { " -buildmapcache" , parseBuildMapCache },
11761171 { " -noshadowvolumes" , parseNoShadows },
@@ -1190,6 +1185,19 @@ static CommandLineParam params[] =
11901185 { " -updateImages" , parseUpdateImages },
11911186 { " -showTeamDot" , parseShowTeamDot },
11921187#endif
1188+
1189+ #ifdef DEBUG_LOGGING
1190+ { " -setDebugLevel" , parseSetDebugLevel },
1191+ { " -clearDebugLevel" , parseClearDebugLevel },
1192+ #endif
1193+
1194+ #ifdef DEBUG_CRASHING
1195+ { " -ignoreAsserts" , parseIgnoreAsserts },
1196+ #endif
1197+
1198+ #ifdef DEBUG_STACKTRACE
1199+ { " -ignoreStackTrace" , parseIgnoreStackTrace },
1200+ #endif
11931201};
11941202
11951203// parseCommandLine ===========================================================
0 commit comments