diff --git a/TacticalAI/DecideAction.cpp b/TacticalAI/DecideAction.cpp index e6c5db5a..d57a4426 100644 --- a/TacticalAI/DecideAction.cpp +++ b/TacticalAI/DecideAction.cpp @@ -2036,6 +2036,18 @@ INT8 DecideActionRed(SOLDIERTYPE *pSoldier, UINT8 ubUnconsciousOK) } } + //////////////////////////////////////////////////////////////////////////// + // WHEN IN THE LIGHT, GET OUT OF THERE! + //////////////////////////////////////////////////////////////////////////// + if ( ubCanMove && InLightAtNight( pSoldier->sGridNo, pSoldier->bLevel ) && pSoldier->bOrders != STATIONARY ) + { + pSoldier->usActionData = FindNearbyDarkerSpot( pSoldier ); + if ( pSoldier->usActionData != NOWHERE ) + { + // move as if leaving water or gas + return( AI_ACTION_LEAVE_WATER_GAS ); + } + } if ( fCivilian && !( pSoldier->ubBodyType == COW || pSoldier->ubBodyType == CRIPPLECIV ) ) { @@ -2339,19 +2351,6 @@ if ( !fCivilian && pSoldier->bTeam != MILITIA_TEAM && gGameOptions.fAirStrikes & } */ - //////////////////////////////////////////////////////////////////////////// - // WHEN IN THE LIGHT, GET OUT OF THERE! - //////////////////////////////////////////////////////////////////////////// - if ( ubCanMove && InLightAtNight( pSoldier->sGridNo, pSoldier->bLevel ) && pSoldier->bOrders != STATIONARY ) - { - pSoldier->usActionData = FindNearbyDarkerSpot( pSoldier ); - if ( pSoldier->usActionData != NOWHERE ) - { - // move as if leaving water or gas - return( AI_ACTION_LEAVE_WATER_GAS ); - } - } - DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"decideactionred: crouch and rest if running out of breath"); //////////////////////////////////////////////////////////////////////// // CROUCH & REST IF RUNNING OUT OF BREATH