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