fixed bug allowing to move robot without soldier having control device if they were both in party where another soldier not chosen to move had the device

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9227 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Shadooow
2022-01-01 20:44:21 +00:00
parent 1749d3adfb
commit e600134786
+15 -4
View File
@@ -4604,11 +4604,22 @@ void HandleSettingTheSelectedListOfMercs( void )
{
INT8 pbErrorNumber = -1;
pSoldier = MercPtrs[gCharactersList[GetSelectedDestChar()].usSolID];
if (!CanCharacterMoveInStrategic(pSoldier, &pbErrorNumber))
INT8 bSquadValue = pSoldier->bAssignment;
// find number of characters in particular squad.
for (INT8 bCounter = 0; bCounter < NUMBER_OF_SOLDIERS_PER_SQUAD; ++bCounter)
{
SetSelectedDestChar(-1);
giDestHighLine = -1;
return;
// valid slot?
if (Squad[bSquadValue][bCounter] != NULL && !CanCharacterMoveInStrategic(Squad[bSquadValue][bCounter], &pbErrorNumber))
{
if (pbErrorNumber != -1)
{
ReportMapScreenMovementError(pbErrorNumber);
}
SetSelectedDestChar(-1);
giDestHighLine = -1;
return;
}
}
// set cursor
SetUpCursorForStrategicMap( );