From c676a48cd575c99023eafcc2ac8451eb89f79361 Mon Sep 17 00:00:00 2001 From: Wanne Date: Mon, 23 May 2016 05:24:45 +0000 Subject: [PATCH] Fix: Added explicit BOOLEAN check for pSoldier->bVisible (by sevenfm) git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8230 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- TacticalAI/AIList.cpp | 2 +- TacticalAI/AIMain.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/TacticalAI/AIList.cpp b/TacticalAI/AIList.cpp index fecb705c..8dc6f568 100644 --- a/TacticalAI/AIList.cpp +++ b/TacticalAI/AIList.cpp @@ -238,7 +238,7 @@ BOOLEAN SatisfiesAIListConditions( SOLDIERTYPE * pSoldier, UINT8 * pubDoneCount, // heard gunshots if ( pSoldier->flags.uiStatusFlags & SOLDIER_COWERING ) { - if ( pSoldier->bVisible ) + if ( pSoldier->bVisible == TRUE ) { // if have profile, don't handle, don't want them running around if ( pSoldier->ubProfile != NO_PROFILE ) diff --git a/TacticalAI/AIMain.cpp b/TacticalAI/AIMain.cpp index 2aaa19a5..7958e9fb 100644 --- a/TacticalAI/AIMain.cpp +++ b/TacticalAI/AIMain.cpp @@ -311,7 +311,7 @@ void HandleSoldierAI( SOLDIERTYPE *pSoldier ) // FIXME - this function is named if ( pSoldier->aiData.fAIFlags & AI_ASLEEP ) { - if ( gfTurnBasedAI && pSoldier->bVisible ) + if ( gfTurnBasedAI && pSoldier->bVisible == TRUE ) { // turn off sleep flag, guy's got to be able to do stuff in turnbased // if he's visible