mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00: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:
+2
-2
@@ -797,9 +797,9 @@ INT16 DynamicAdjustAPConstants(INT16 iniReadValue, INT16 iniDefaultValue, BOOLEA
|
||||
if(iniReadValue == iniDefaultValue)
|
||||
{
|
||||
if(!reverse)
|
||||
iniReadValue = (INT16)(((FLOAT)iniReadValue*(FLOAT)APBPConstants[AP_MAXIMUM]/100)+.5);
|
||||
iniReadValue = (INT16)(((FLOAT)iniReadValue*(FLOAT)APBPConstants[AP_MAXIMUM]/100)+(iniReadValue<0?-.5:.5));
|
||||
else
|
||||
iniReadValue = (INT16)(((FLOAT)iniReadValue/(FLOAT)APBPConstants[AP_MAXIMUM]*100)+.5);
|
||||
iniReadValue = (INT16)(((FLOAT)iniReadValue/(FLOAT)APBPConstants[AP_MAXIMUM]*100)+(iniReadValue<0?-.5:.5));
|
||||
}
|
||||
|
||||
return iniReadValue;
|
||||
|
||||
Reference in New Issue
Block a user