Fixed a NCTH bug where a negative PercentCap would not calculate properly because the uiCap variable it applies to could not support signed results.

Fixed a NCTH bug where a negative PercentTargetTrackingSpeed would not calculate properly because the uiTilesForMaxPenalty variable it applies to could not support signed results.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@4637 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
ChrisL
2011-09-06 21:19:52 +00:00
parent 829ce0b902
commit 9b566f502c
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -7051,7 +7051,7 @@ void CalcTargetMovementOffset( SOLDIERTYPE *pShooter, SOLDIERTYPE *pTarget, OBJE
// Add a percentage-based modifier from the weapon and its attachments. Movement tracking devices will
// provide faster compensation for target movement, allowing the shooter to begin adjusting the muzzle
// after the target moves a smaller number of tiles.
uiTilesForMaxPenalty += (uiTilesForMaxPenalty * GetTargetTrackingModifier( pWeapon, gAnimControl[ pShooter->usAnimState ].ubEndHeight )) / 100;
uiTilesForMaxPenalty += (INT16)(uiTilesForMaxPenalty * GetTargetTrackingModifier( pWeapon, gAnimControl[ pShooter->usAnimState ].ubEndHeight )) / 100;
if (uiTilesForMaxPenalty == 0)
{
+1 -1
View File
@@ -5327,7 +5327,7 @@ UINT32 CalcNewChanceToHitGun(SOLDIERTYPE *pSoldier, INT32 sGridNo, INT16 ubAimTi
UINT32 uiCap = (UINT32)iCombinedSkill;
// Add percent-based modifier from the gun and its attachments
uiCap += (uiCap * GetPercentCapModifier( pInHand, gAnimControl[ pSoldier->usAnimState ].ubEndHeight )) / 100;
uiCap += (INT32)(uiCap * GetPercentCapModifier( pInHand, gAnimControl[ pSoldier->usAnimState ].ubEndHeight )) / 100;
// Add bonuses from Sniper Skill. Applies only when using a scope at or above its "best" range.
INT16 sDifference = 99 - uiCap;