mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
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:
+1
-1
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user