fixed bug allowing to plot path with Robot or NPCs that needs to be escorted on their own

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9225 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Shadooow
2022-01-01 12:36:03 +00:00
parent 27c0d1f8fe
commit 9737bd9255
+9 -1
View File
@@ -4602,13 +4602,21 @@ void HandleSettingTheSelectedListOfMercs( void )
if( GetSelectedDestChar() != -1 )
{
INT8 pbErrorNumber = -1;
pSoldier = MercPtrs[gCharactersList[GetSelectedDestChar()].usSolID];
if (!CanCharacterMoveInStrategic(pSoldier, &pbErrorNumber))
{
SetSelectedDestChar(-1);
giDestHighLine = -1;
return;
}
// set cursor
SetUpCursorForStrategicMap( );
fTeamPanelDirty = TRUE;
fMapPanelDirty = TRUE;
fCharacterInfoPanelDirty = TRUE;
DeselectSelectedListMercsWhoCantMoveWithThisGuy( &( Menptr[ gCharactersList[GetSelectedDestChar()].usSolID ] ) );
DeselectSelectedListMercsWhoCantMoveWithThisGuy( pSoldier );
// remember the current paths for all selected characters so we can restore them if need be
RememberPreviousPathForAllSelectedChars();