mirror of
https://github.com/1dot13/source.git
synced 2026-08-12 14:10:23 +02:00
Adjusted the system that dynamically adjusts AP/BP values so it would round negative numbers better.
Fixed an INT8 redefine of AP values which was causing AP values larger then 127 to become negative numbers. Fixed an autofire glich that would allow you to empty an entire mag while using the xxx_AP_BONUS settings in the INI file. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@2450 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+3
-2
@@ -1093,7 +1093,8 @@ INT16 CalcAPsToAutofire( INT16 bBaseActionPoints, OBJECTTYPE * pObj, UINT8 bDoAu
|
||||
aps = ( aps * ( 100 - GetPercentAutofireAPReduction(pObj) ) ) / 100;
|
||||
|
||||
if ( aps < 0 ) aps = 0;
|
||||
else if ( aps > APBPConstants[AP_MAXIMUM] ) aps = APBPConstants[AP_MAXIMUM];
|
||||
//CHRISL: This can cause problem if a player uses any of the xxx_AP_BONUS values in the INI file.
|
||||
//else if ( aps > APBPConstants[AP_MAXIMUM] ) aps = APBPConstants[AP_MAXIMUM];
|
||||
}
|
||||
|
||||
DebugMsg(TOPIC_JA2,DBG_LEVEL_3,String("CalcAPsToAutoFire: return aps = %d", aps));
|
||||
@@ -1240,7 +1241,7 @@ INT16 CalcTotalAPsToAttack( SOLDIERTYPE *pSoldier, INT16 sGridNo, UINT8 ubAddTur
|
||||
|
||||
}
|
||||
|
||||
return( (INT8)sAPCost );
|
||||
return( sAPCost );
|
||||
}
|
||||
|
||||
INT16 MinAPsToAttack(SOLDIERTYPE *pSoldier, INT16 sGridno, UINT8 ubAddTurningCost, UINT8 ubForceRaiseGunCost)
|
||||
|
||||
Reference in New Issue
Block a user