mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
- added team-specific modifiers for AI suppression
- Fix: incorrect platoon spawning wehn initializing Cambria counter attack git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5996 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -1331,6 +1331,10 @@ void LoadGameExternalOptions()
|
||||
gGameExternalOptions.ubSuppressionToleranceMax = iniReader.ReadInteger("Tactical Suppression Fire Settings","SUPPRESSION_TOLERANCE_MAX", 18, 1, 24);
|
||||
gGameExternalOptions.ubSuppressionToleranceMin = iniReader.ReadInteger("Tactical Suppression Fire Settings","SUPPRESSION_TOLERANCE_MIN", 1, 0, 24);
|
||||
|
||||
// Flugente: suppression effectiveness modifiers for teams
|
||||
gGameExternalOptions.usSuppressionEffectivenessPlayer = iniReader.ReadInteger("Tactical Suppression Fire Settings","SUPPRESSION_EFFECTIVENESS_PLAYER", 100, 0, 1000);
|
||||
gGameExternalOptions.usSuppressionEffectivenessAI = iniReader.ReadInteger("Tactical Suppression Fire Settings","SUPPRESSION_EFFECTIVENESS_AI", 100, 0, 1000);
|
||||
|
||||
// HEADROCK HAM 3.2: This feature allows the status, leadership and experience of nearby friendlies help/hinder a character's tolerance, based on their distance from him.
|
||||
gGameExternalOptions.fFriendliesAffectTolerance = iniReader.ReadBoolean("Tactical Suppression Fire Settings","NEARBY_FRIENDLIES_AFFECT_TOLERANCE", FALSE);
|
||||
|
||||
|
||||
@@ -809,6 +809,10 @@ typedef struct
|
||||
UINT8 ubSuppressionToleranceMax;
|
||||
UINT8 ubSuppressionToleranceMin;
|
||||
|
||||
// Flugente: suppression modifiers for player and other teams
|
||||
UINT16 usSuppressionEffectivenessPlayer;
|
||||
UINT16 usSuppressionEffectivenessAI;
|
||||
|
||||
// HEADROCK HAM B2: Suppression Shock effectiveness (percentage, 100 = "normal", 0 = deactivated. Range 0-65535)
|
||||
UINT16 usSuppressionShockEffect;
|
||||
|
||||
|
||||
@@ -4432,8 +4432,8 @@ void ExecuteStrategicAIAction( UINT16 usActionCode, INT16 sSectorX, INT16 sSecto
|
||||
ubSourceSectorID = SEC_P3;
|
||||
|
||||
stagesector0 = SEC_M2;
|
||||
stagesector1 = SEC_M3;
|
||||
stagesector2 = SEC_M3;
|
||||
stagesector1 = ubSourceSectorID;
|
||||
stagesector2 = ubSourceSectorID;
|
||||
stagesector3 = SEC_M6;
|
||||
|
||||
assaultsector0 = SEC_H4;
|
||||
@@ -4449,11 +4449,19 @@ void ExecuteStrategicAIAction( UINT16 usActionCode, INT16 sSectorX, INT16 sSecto
|
||||
if ( !(SectorInfo[ ubSourceSectorID ].ubNumTroops > 0) )
|
||||
ubSourceSectorID = SEC_P3;
|
||||
|
||||
stagesector0 = SEC_M6;
|
||||
stagesector1 = SEC_M6;
|
||||
stagesector2 = SEC_M6;
|
||||
stagesector0 = ubSourceSectorID;
|
||||
stagesector1 = ubSourceSectorID;
|
||||
stagesector2 = ubSourceSectorID;
|
||||
stagesector3 = SEC_L11;
|
||||
|
||||
if ( !(SectorInfo[ stagesector3 ].ubNumTroops > 0) )
|
||||
{
|
||||
ubSourceSectorID = SEC_N9;
|
||||
|
||||
if ( !(SectorInfo[ stagesector3 ].ubNumTroops > 0) )
|
||||
ubSourceSectorID = ubSourceSectorID;
|
||||
}
|
||||
|
||||
assaultsector0 = SEC_I8;
|
||||
assaultsector1 = SEC_I8;
|
||||
assaultsector2 = SEC_H7;
|
||||
|
||||
@@ -8224,6 +8224,12 @@ void HandleSuppressionFire( UINT8 ubTargetedMerc, UINT8 ubCausedAttacker )
|
||||
// more shallow.
|
||||
// The relation between AP Loss and Suppression Points is LINEAR.
|
||||
ubPointsLost = ( ( (pSoldier->ubSuppressionPoints * APBPConstants[AP_SUPPRESSION_MOD]) / (bTolerance + 6) ) * 2 + 1 ) / 2;
|
||||
|
||||
// Flugente: added ini options for suppression effectiveness for player team and everybody else
|
||||
if ( pSoldier->bTeam == gbPlayerNum )
|
||||
sFinalSuppressionEffectiveness = sFinalSuppressionEffectiveness * gGameExternalOptions.usSuppressionEffectivenessPlayer / 100;
|
||||
else
|
||||
sFinalSuppressionEffectiveness = sFinalSuppressionEffectiveness * gGameExternalOptions.usSuppressionEffectivenessAI / 100;
|
||||
|
||||
// INI-Controlled intensity. SuppressionEffectiveness acts as a percentage applied to the number of lost APs.
|
||||
// To turn off the entire Suppression system, simply set the INI value to 0. (0% AP Loss)
|
||||
@@ -8236,7 +8242,7 @@ void HandleSuppressionFire( UINT8 ubTargetedMerc, UINT8 ubCausedAttacker )
|
||||
{
|
||||
if (ubPointsLost > usLimitSuppressionAPsLostPerAttack)
|
||||
{
|
||||
// Flugente: eh.. woudln't this _always_ be 255? I suspect this should be __min
|
||||
// Flugente: eh.. wouldn't this _always_ be 255? I suspect this should be __min
|
||||
//ubPointsLost = __max(255,(UINT8)usLimitSuppressionAPsLostPerAttack);
|
||||
ubPointsLost = __min(255,(UINT8)usLimitSuppressionAPsLostPerAttack);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user