From bc7fe70fb75e8959b7ea79019397d5fd538fb383 Mon Sep 17 00:00:00 2001 From: Sevenfm Date: Sun, 1 Nov 2020 16:44:37 +0000 Subject: [PATCH] CalcBestThrow: fixed bug ending throw search if one if the checked spots was too far for throw. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8915 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- TacticalAI/Attacks.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TacticalAI/Attacks.cpp b/TacticalAI/Attacks.cpp index 6239acdd..de76b999 100644 --- a/TacticalAI/Attacks.cpp +++ b/TacticalAI/Attacks.cpp @@ -1403,7 +1403,7 @@ void CalcBestThrow(SOLDIERTYPE *pSoldier, ATTACKTYPE *pBestThrow) if ( PythSpacesAway( pSoldier->sGridNo, sGridNo ) > iTossRange ) { // can't throw there! - return; + continue; } // if considering a gas/smoke grenade, check to see if there is such stuff already there!