mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
-put light check back to where it was before
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@282 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+12
-13
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user