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