Allow specific alert status AI logging

Less clutter in the AI logs if, for example one is only interested in BLACK status decisions
This commit is contained in:
Asdow
2024-02-04 15:29:05 +02:00
parent 7ee8165e02
commit f249406ba0
4 changed files with 225 additions and 223 deletions
+3 -2
View File
@@ -286,14 +286,15 @@ STR16 wszAction[] = {
UINT32 guiAIStartCounter = 0, guiAILastCounter = 0;
//UINT8 gubAISelectedSoldier = NOBODY;
BOOLEAN gfLogsEnabled = TRUE;
bool gLogDecideActionRed = false;
void DebugAI( INT8 bMsgType, SOLDIERTYPE *pSoldier, STR szOutput, INT8 bAction )
void DebugAI( INT8 bMsgType, SOLDIERTYPE *pSoldier, STR szOutput, bool doLog, INT8 bAction)
{
FILE* DebugFile;
CHAR8 msg[1024];
CHAR8 buf[1024];
if (!gfLogsEnabled)
if (!gfLogsEnabled || !doLog || pSoldier == nullptr)
return;
memset(buf, 0, 1024 * sizeof(char));