- Fixed a bug that caused the PercentCapModifier and the TilesMaxPenalty to get bogus values (by Flugente & cnagorneac )

o This bug was re-added when HAM5 was integrated ...
o see here: http://www.bears-pit.com/board/ubbthreads.php/topics/304750.html#Post304750


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5274 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Wanne
2012-05-15 21:07:53 +00:00
parent 64eb3caf9f
commit c4f005d7e7
2 changed files with 7 additions and 7 deletions
+2 -2
View File
@@ -7352,7 +7352,7 @@ void CalcTargetMovementOffset( SOLDIERTYPE *pShooter, SOLDIERTYPE *pTarget, OBJE
// Again, if the shooter is skilled, this will occur after fewer tiles have been moved.
// If the target moves *more* tiles than this, the movement penalty will begin to diminish. That's our shooter
// beginning to compensate for the target's speed, pointing the gun ahead of the target ("Leading the target").
UINT8 uiTilesForMaxPenalty = (100-uiCombinedSkill) / (100 / gGameCTHConstants.MOVEMENT_TRACKING_DIFFICULTY);
INT16 uiTilesForMaxPenalty = (INT16)((100-uiCombinedSkill) / (100 / gGameCTHConstants.MOVEMENT_TRACKING_DIFFICULTY));
UINT8 stance = gAnimControl[ pShooter->usAnimState ].ubEndHeight;
@@ -7365,7 +7365,7 @@ void CalcTargetMovementOffset( SOLDIERTYPE *pShooter, SOLDIERTYPE *pTarget, OBJE
// after the target moves a smaller number of tiles.
INT32 moda = (INT32)(uiTilesForMaxPenalty * GetTargetTrackingModifier( pWeapon, stance )) / 100;
INT32 modb = (INT32)(uiTilesForMaxPenalty * GetTargetTrackingModifier( pWeapon, gAnimControl[ pShooter->usAnimState ].ubEndHeight )) / 100;
uiTilesForMaxPenalty += (UINT8)((gGameExternalOptions.ubProneModifierPercentage * moda + (100 - gGameExternalOptions.ubProneModifierPercentage) * modb)/100);
uiTilesForMaxPenalty += (INT16)((gGameExternalOptions.ubProneModifierPercentage * moda + (100 - gGameExternalOptions.ubProneModifierPercentage) * modb)/100);
if (uiTilesForMaxPenalty == 0)
{