mirror of
https://github.com/1dot13/source.git
synced 2026-09-09 14:46:05 +02:00
Whitespace changes
This commit is contained in:
@@ -2696,7 +2696,6 @@ INT8 DecideActionRed(SOLDIERTYPE *pSoldier)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////
|
||||||
// IF POSSIBLE, FIRE LONG RANGE WEAPONS AT TARGETS REPORTED BY RADIO
|
// IF POSSIBLE, FIRE LONG RANGE WEAPONS AT TARGETS REPORTED BY RADIO
|
||||||
////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////
|
||||||
@@ -2869,6 +2868,7 @@ INT8 DecideActionRed(SOLDIERTYPE *pSoldier)
|
|||||||
DebugAI(AI_MSG_TOPIC, pSoldier, String("[use smoke to cover friend]"), gLogDecideActionRed);
|
DebugAI(AI_MSG_TOPIC, pSoldier, String("[use smoke to cover friend]"), gLogDecideActionRed);
|
||||||
|
|
||||||
CheckTossFriendSmoke(pSoldier, &BestThrow);
|
CheckTossFriendSmoke(pSoldier, &BestThrow);
|
||||||
|
|
||||||
if (BestThrow.ubPossible)
|
if (BestThrow.ubPossible)
|
||||||
{
|
{
|
||||||
DebugAI(AI_MSG_INFO, pSoldier, String("Throw possible"), gLogDecideActionRed);
|
DebugAI(AI_MSG_INFO, pSoldier, String("Throw possible"), gLogDecideActionRed);
|
||||||
@@ -3217,7 +3217,7 @@ INT8 DecideActionRed(SOLDIERTYPE *pSoldier)
|
|||||||
return(AI_ACTION_RED_ALERT);
|
return(AI_ACTION_RED_ALERT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// if we can't call in artillery, jam frequencies, so that the palyer can't use radio skills
|
// if we can't call in artillery, jam frequencies, so that the player can't use radio skills
|
||||||
else if (!pSoldier->IsJamming() && !pSoldier->CanAnyArtilleryStrikeBeOrdered(&tmp))
|
else if (!pSoldier->IsJamming() && !pSoldier->CanAnyArtilleryStrikeBeOrdered(&tmp))
|
||||||
{
|
{
|
||||||
DebugAI(AI_MSG_INFO, pSoldier, String("Start jamming radio frequencies"), gLogDecideActionRed);
|
DebugAI(AI_MSG_INFO, pSoldier, String("Start jamming radio frequencies"), gLogDecideActionRed);
|
||||||
@@ -3351,6 +3351,7 @@ INT8 DecideActionRed(SOLDIERTYPE *pSoldier)
|
|||||||
DebugAI(AI_MSG_TOPIC, pSoldier, String("[Provide medical aid]"), gLogDecideActionRed);
|
DebugAI(AI_MSG_TOPIC, pSoldier, String("[Provide medical aid]"), gLogDecideActionRed);
|
||||||
|
|
||||||
UINT8 ubPerson = GetClosestWoundedSoldierID( pSoldier, gGameExternalOptions.sEnemyMedicsSearchRadius, pSoldier->bTeam);
|
UINT8 ubPerson = GetClosestWoundedSoldierID( pSoldier, gGameExternalOptions.sEnemyMedicsSearchRadius, pSoldier->bTeam);
|
||||||
|
|
||||||
// are we ourselves the patient?
|
// are we ourselves the patient?
|
||||||
if ( ubPerson == pSoldier->ubID )
|
if ( ubPerson == pSoldier->ubID )
|
||||||
{
|
{
|
||||||
@@ -3418,6 +3419,7 @@ INT8 DecideActionRed(SOLDIERTYPE *pSoldier)
|
|||||||
DebugAI(AI_MSG_TOPIC, pSoldier, String("[Seek medical aid]"), gLogDecideActionRed);
|
DebugAI(AI_MSG_TOPIC, pSoldier, String("[Seek medical aid]"), gLogDecideActionRed);
|
||||||
|
|
||||||
UINT8 ubPerson = GetClosestMedicSoldierID( pSoldier, gGameExternalOptions.sEnemyMedicsSearchRadius / 2, pSoldier->bTeam);
|
UINT8 ubPerson = GetClosestMedicSoldierID( pSoldier, gGameExternalOptions.sEnemyMedicsSearchRadius / 2, pSoldier->bTeam);
|
||||||
|
|
||||||
if ( ubPerson != NOBODY )
|
if ( ubPerson != NOBODY )
|
||||||
{
|
{
|
||||||
DebugAI(AI_MSG_INFO, pSoldier, String("Found a medic!"), gLogDecideActionRed);
|
DebugAI(AI_MSG_INFO, pSoldier, String("Found a medic!"), gLogDecideActionRed);
|
||||||
@@ -3494,7 +3496,6 @@ INT8 DecideActionRed(SOLDIERTYPE *pSoldier)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////
|
||||||
// RED RETREAT
|
// RED RETREAT
|
||||||
////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////
|
||||||
@@ -3608,6 +3609,7 @@ INT8 DecideActionRed(SOLDIERTYPE *pSoldier)
|
|||||||
// (we never want NPCs to choose to radio if they would have to wait a turn)
|
// (we never want NPCs to choose to radio if they would have to wait a turn)
|
||||||
if ( !(pSoldier->usSoldierFlagMask & SOLDIER_RAISED_REDALERT) && !fCivilian && (pSoldier->bActionPoints >= APBPConstants[AP_RADIO]) && (gTacticalStatus.Team[pSoldier->bTeam].bMenInSector > 1) )
|
if ( !(pSoldier->usSoldierFlagMask & SOLDIER_RAISED_REDALERT) && !fCivilian && (pSoldier->bActionPoints >= APBPConstants[AP_RADIO]) && (gTacticalStatus.Team[pSoldier->bTeam].bMenInSector > 1) )
|
||||||
{
|
{
|
||||||
|
|
||||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"decideactionred: checking to radio red alert");
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"decideactionred: checking to radio red alert");
|
||||||
DebugAI(AI_MSG_TOPIC, pSoldier, String("[Radio red alert]"), gLogDecideActionRed);
|
DebugAI(AI_MSG_TOPIC, pSoldier, String("[Radio red alert]"), gLogDecideActionRed);
|
||||||
|
|
||||||
@@ -3747,7 +3749,6 @@ INT8 DecideActionRed(SOLDIERTYPE *pSoldier)
|
|||||||
else { DebugAI(AI_MSG_INFO, pSoldier, String("Throw not possible"), gLogDecideActionRed); }
|
else { DebugAI(AI_MSG_INFO, pSoldier, String("Throw not possible"), gLogDecideActionRed); }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// sevenfm: no Main Red AI for civilians
|
// sevenfm: no Main Red AI for civilians
|
||||||
if ( (gGameExternalOptions.fEnemyTanksCanMoveInTactical || !ARMED_VEHICLE( pSoldier )) &&
|
if ( (gGameExternalOptions.fEnemyTanksCanMoveInTactical || !ARMED_VEHICLE( pSoldier )) &&
|
||||||
!(pSoldier->flags.uiStatusFlags & (SOLDIER_DRIVER | SOLDIER_PASSENGER)) &&
|
!(pSoldier->flags.uiStatusFlags & (SOLDIER_DRIVER | SOLDIER_PASSENGER)) &&
|
||||||
@@ -4247,7 +4248,6 @@ INT8 DecideActionRed(SOLDIERTYPE *pSoldier)
|
|||||||
DebugAI(AI_MSG_INFO, pSoldier, String("Distance not suitable, seek enemy instead"), gLogDecideActionRed);
|
DebugAI(AI_MSG_INFO, pSoldier, String("Distance not suitable, seek enemy instead"), gLogDecideActionRed);
|
||||||
return AI_ACTION_SEEK_OPPONENT;
|
return AI_ACTION_SEEK_OPPONENT;
|
||||||
}
|
}
|
||||||
|
|
||||||
pSoldier->aiData.usActionData = FindFlankingSpot (pSoldier, sClosestDisturbance, action );
|
pSoldier->aiData.usActionData = FindFlankingSpot (pSoldier, sClosestDisturbance, action );
|
||||||
|
|
||||||
if (TileIsOutOfBounds(pSoldier->aiData.usActionData) || pSoldier->numFlanks >= MAX_FLANKS_RED )
|
if (TileIsOutOfBounds(pSoldier->aiData.usActionData) || pSoldier->numFlanks >= MAX_FLANKS_RED )
|
||||||
@@ -4268,6 +4268,7 @@ INT8 DecideActionRed(SOLDIERTYPE *pSoldier)
|
|||||||
return(AI_ACTION_SEEK_OPPONENT);
|
return(AI_ACTION_SEEK_OPPONENT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DebugAI(AI_MSG_INFO, pSoldier, String("Seek enemy"), gLogDecideActionRed);
|
DebugAI(AI_MSG_INFO, pSoldier, String("Seek enemy"), gLogDecideActionRed);
|
||||||
@@ -5425,7 +5426,6 @@ INT8 DecideActionBlack(SOLDIERTYPE *pSoldier)
|
|||||||
(!ProneSightCoverAtSpot(pSoldier, pSoldier->sGridNo, FALSE) && !AnyCoverAtSpot(pSoldier, pSoldier->sGridNo) || pSoldier->TakenLargeHit()) &&
|
(!ProneSightCoverAtSpot(pSoldier, pSoldier->sGridNo, FALSE) && !AnyCoverAtSpot(pSoldier, pSoldier->sGridNo) || pSoldier->TakenLargeHit()) &&
|
||||||
(pSoldier->TakenLargeHit() || pSoldier->ShockLevelPercent() > 20 + Random(80)))
|
(pSoldier->TakenLargeHit() || pSoldier->ShockLevelPercent() > 20 + Random(80)))
|
||||||
{
|
{
|
||||||
DebugAI(AI_MSG_TOPIC, pSoldier, String("[Self smoke when under fire]"));
|
|
||||||
DebugAI(AI_MSG_INFO, pSoldier, String("check if soldier can cover himself with smoke"));
|
DebugAI(AI_MSG_INFO, pSoldier, String("check if soldier can cover himself with smoke"));
|
||||||
|
|
||||||
CheckTossSelfSmoke(pSoldier, &BestThrow);
|
CheckTossSelfSmoke(pSoldier, &BestThrow);
|
||||||
|
|||||||
Reference in New Issue
Block a user