fix: Mercs were always complaining that they can't hit a target with buckshot. Problem was that only one pellet was considered for the fake shot. Now all are calculated and the best result is returned.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7741 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
silversurfer
2015-02-16 19:23:09 +00:00
parent 38cb0f8ffc
commit 1d1616707d
+8 -1
View File
@@ -4438,6 +4438,7 @@ INT8 FireBulletGivenTargetNCTH( SOLDIERTYPE * pFirer, FLOAT dEndX, FLOAT dEndY,
UINT8 ubShots=0;
UINT8 ubImpact=0;
INT8 bCTGT = 0;
INT8 bTempCTGT = 0;
UINT8 ubSpreadIndex = 0;
UINT16 usBulletFlags = 0;
int n=0;
@@ -4858,7 +4859,13 @@ INT8 FireBulletGivenTargetNCTH( SOLDIERTYPE * pFirer, FLOAT dEndX, FLOAT dEndY,
{
bCTGT = FireBullet( pFirer->ubID, pBullet, TRUE );
RemoveBullet( iBullet );
return( bCTGT );
bTempCTGT = __max( bTempCTGT, bCTGT);
if ( ubLoop + 1 < ubShots && bTempCTGT < 100 )
{
continue;
}
else
return( bTempCTGT );
}
else
{