-restored previous light check changes

-fixed enemies getting closer w/out firing

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@283 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
MaddMugsy
2006-06-21 19:16:31 +00:00
parent 2c26924256
commit f83af12336
3 changed files with 21 additions and 13 deletions
+13 -12
View File
@@ -2036,18 +2036,6 @@ 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 ) )
{
@@ -2351,6 +2339,19 @@ 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