mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
Corretion to the 100AP/HAM integration. Also made an APBPConstant a littler clearer (hopefully).
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@2699 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+3
-3
@@ -1064,9 +1064,9 @@ void LoadGameAPBPConstants()
|
||||
APBPConstants[BAD_AP_COST] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","BAD_AP_COST",36),36);
|
||||
APBPConstants[AP_RELOAD_LOOSE] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_RELOAD_LOOSE",8),8);
|
||||
APBPConstants[AP_UNJAM] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_UNJAM",2),2);
|
||||
APBPConstants[AP_MAX_SUPPRESSED] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_MAX_SUPPRESSED",32),32);
|
||||
APBPConstants[AP_MAX_TURN_SUPPRESSED] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_MAX_TURN_SUPPRESSED",100),100);
|
||||
APBPConstants[AP_MIN_LIMIT_SUPPRESSION_LOSS] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_MIN_LIMIT_SUPPRESSION_LOSS",-100),-100);
|
||||
APBPConstants[AP_MAX_SUPPRESSED] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_MAX_SUPPRESSED",64),64);
|
||||
APBPConstants[AP_MAX_TURN_SUPPRESSED] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_MAX_TURN_SUPPRESSED",200),200);
|
||||
APBPConstants[AP_MIN_SUPPRESSION_LIMIT] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_MIN_SUPPRESSION_LIMIT",-100),-100);
|
||||
APBPConstants[AP_LOST_PER_MORALE_DROP] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_LOST_PER_MORALE_DROP",12),12);
|
||||
APBPConstants[AP_SUPPRESSION_MOD] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","AP_SUPPRESSION_MOD",24),24);
|
||||
APBPConstants[DEFAULT_APS] = DynamicAdjustAPConstants(iniReader.ReadInteger("APConstants","DEFAULT_APS",80),80);
|
||||
|
||||
@@ -91,7 +91,7 @@ AP_UNJAM,
|
||||
AP_WRONG_MAG,
|
||||
AP_MAX_SUPPRESSED,
|
||||
AP_MAX_TURN_SUPPRESSED,
|
||||
AP_MIN_LIMIT_SUPPRESSION_LOSS,
|
||||
AP_MIN_SUPPRESSION_LIMIT,
|
||||
AP_LOST_PER_MORALE_DROP,
|
||||
AP_SUPPRESSION_MOD,
|
||||
AUTOFIRE_SHOTS_AP_VALUE,
|
||||
|
||||
@@ -7279,9 +7279,9 @@ void HandleSuppressionFire( UINT8 ubTargetedMerc, UINT8 ubCausedAttacker )
|
||||
// HEADROCK HAM B2: This makes sure that we never lose more APs than we're allowed per turn,
|
||||
if (APS_SUPPRESSED_TOTAL = TRUE)
|
||||
{
|
||||
if (pSoldier->ubAPsLostToSuppression + ubPointsLost > APBPConstants[AP_MAX_SUPPRESSED])
|
||||
if (pSoldier->ubAPsLostToSuppression + ubPointsLost > APBPConstants[AP_MAX_TURN_SUPPRESSED])
|
||||
{
|
||||
ubPointsLost = APBPConstants[AP_MAX_SUPPRESSED] - pSoldier->ubAPsLostToSuppression;
|
||||
ubPointsLost = APBPConstants[AP_MAX_TURN_SUPPRESSED] - pSoldier->ubAPsLostToSuppression;
|
||||
}
|
||||
}
|
||||
// Keeps a number for later reference
|
||||
@@ -7456,9 +7456,9 @@ void HandleSuppressionFire( UINT8 ubTargetedMerc, UINT8 ubCausedAttacker )
|
||||
DebugMsg(TOPIC_JA2,DBG_LEVEL_3,String("HandleSuppressionFire: reduce action points"));
|
||||
// Reduce action points!
|
||||
// HEADROCK HAM Beta 2.2: Enforce a minimum limit via INI.
|
||||
if (pSoldier->bActionPoints - ubPointsLost < APBPConstants[AP_MIN_LIMIT_SUPPRESSION_LOSS] )
|
||||
if (pSoldier->bActionPoints - ubPointsLost < APBPConstants[AP_MIN_SUPPRESSION_LIMIT] )
|
||||
{
|
||||
pSoldier->bActionPoints = APBPConstants[AP_MIN_LIMIT_SUPPRESSION_LOSS];
|
||||
pSoldier->bActionPoints = APBPConstants[AP_MIN_SUPPRESSION_LIMIT];
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -1850,8 +1850,8 @@ INT16 SOLDIERTYPE::CalcActionPoints( void )
|
||||
|
||||
// If resulting APs are below our permitted minimum, raise them to it!
|
||||
// HEADROCK: Enforce new minimums due to suppression. I should've done this neater though.
|
||||
if (ubPoints < APBPConstants[AP_MIN_LIMIT_SUPPRESSION_LOSS])
|
||||
ubPoints = APBPConstants[AP_MIN_LIMIT_SUPPRESSION_LOSS];
|
||||
if (ubPoints < APBPConstants[AP_MIN_SUPPRESSION_LIMIT])
|
||||
ubPoints = APBPConstants[AP_MIN_SUPPRESSION_LIMIT];
|
||||
|
||||
// make sure action points doesn't exceed the permitted maximum
|
||||
ubMaxAPs = gubMaxActionPoints[ this->ubBodyType ];
|
||||
|
||||
Reference in New Issue
Block a user