mirror of
https://github.com/1dot13/source.git
synced 2026-08-12 14:10:23 +02:00
Moving Tanks Feature (by anv)
- feature: tanks can move around in tactical. Set with Tactical Gameplay Settings > ENEMY_TANKS_CAN_MOVE. - feature: tanks can ignore chance to get through and destroy enemy cover even if it probably won't hit anyone behind it. Set with Tactical Gameplay Settings > ENEMY_TANKS_BLOW_OBSTACLES_UP. - feature: tanks can use cannon even against single mercs and in perfect health. Set with Tactical Gameplay Settings > ENEMY_TANKS_DONT_SPARE_SHELLS. - feature: tanks can noticed as soon as any part of it is visible. Set with Tactical Gameplay Settings > ENEMY_TANKS_ANY_PART_VISIBLE. - feature: depending on game difficulty enemy patrols at game start can be randomly reinforced with tank. Set with Strategic Gameplay Settings > ARMY_USES_TANKS_IN_PATROLS. - feature: depending on game difficulty enemy groups created during offensives can include tanks. Set with trategic Gameplay Settings > ARMY_USES_TANKS_IN_ATTACKS. - feature: mercs in vehicles automatically rest their guns, - fix: guns can be rested on vehicles, - rewritten code to allow putting enemies inside vehicles, - added missing descriptions for all vehicle options to INIEditorJA2Options.xml. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7277 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -346,7 +346,7 @@ void HandleSoldierAI( SOLDIERTYPE *pSoldier ) // FIXME - this function is named
|
||||
return;
|
||||
}
|
||||
|
||||
if ( ( (pSoldier->flags.uiStatusFlags & SOLDIER_VEHICLE) && !TANK( pSoldier ) ) || AM_A_ROBOT( pSoldier ) )
|
||||
if ( ( !gGameExternalOptions.fEnemyTanksCanMoveInTactical && ( (pSoldier->flags.uiStatusFlags & SOLDIER_VEHICLE) && !TANK( pSoldier ) ) ) || AM_A_ROBOT( pSoldier ) )
|
||||
{
|
||||
// bail out!
|
||||
#ifdef TESTAICONTROL
|
||||
@@ -1235,7 +1235,7 @@ void CancelAIAction(SOLDIERTYPE *pSoldier, UINT8 ubForce)
|
||||
#endif
|
||||
|
||||
// re-enable cover checking, something is new or something strange happened
|
||||
if(!TANK(pSoldier))//dnl ch64 290813
|
||||
if( gGameExternalOptions.fEnemyTanksCanMoveInTactical || !TANK(pSoldier))//dnl ch64 290813
|
||||
SkipCoverCheck = FALSE;
|
||||
|
||||
// turn off new situation flag to stop this from repeating all the time!
|
||||
@@ -1506,7 +1506,7 @@ void RefreshAI(SOLDIERTYPE *pSoldier)
|
||||
|
||||
if (pSoldier->aiData.bAlertStatus == STATUS_YELLOW)
|
||||
SkipCoverCheck = FALSE;
|
||||
if(TANK(pSoldier))//dnl ch64 290813 tanks don't have move animations
|
||||
if( !gGameExternalOptions.fEnemyTanksCanMoveInTactical && TANK(pSoldier) )//dnl ch64 290813 tanks don't have move animations
|
||||
SkipCoverCheck = TRUE;
|
||||
|
||||
// if he's in battle or knows opponents are here
|
||||
@@ -1597,7 +1597,7 @@ INT8 ExecuteAction(SOLDIERTYPE *pSoldier)
|
||||
|
||||
// in most cases, merc will change location, or may cause damage to opponents,
|
||||
// so a new cover check will be necessary. Exceptions handled individually.
|
||||
if(!TANK(pSoldier))//dnl ch64 290813
|
||||
if( gGameExternalOptions.fEnemyTanksCanMoveInTactical || !TANK(pSoldier) )//dnl ch64 290813
|
||||
SkipCoverCheck = FALSE;
|
||||
|
||||
// reset this field, too
|
||||
@@ -2612,6 +2612,11 @@ void HandleAITacticalTraversal( SOLDIERTYPE * pSoldier )
|
||||
++pSectorInfo->ubNumAdmins;
|
||||
break;
|
||||
|
||||
case SOLDIER_CLASS_TANK:
|
||||
if( TANK(pSoldier) )
|
||||
++pSectorInfo->ubNumTanks;
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
ProcessQueenCmdImplicationsOfDeath( pSoldier );
|
||||
|
||||
Reference in New Issue
Block a user