Fixed bug splitting escort-requiring npc with another merc, who is under that npc in squad list, from existing squad resulting in putting the two into different groups and disallowing to plot movement.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9251 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Shadooow
2022-01-12 03:12:33 +00:00
parent 5aad9fc2dc
commit 18b21ce561
+3 -3
View File
@@ -3240,7 +3240,7 @@ void DeselectSoldierForMovement( SOLDIERTYPE *pSoldier )
}
void SelectSquadForMovement( INT32 iSquadNumber )
void SelectSquadForMovement( INT32 iSquadNumber, BOOLEAN fCheckCanMove = TRUE )
{
INT32 iCounter = 0, iCount = 0;
BOOLEAN fSomeCantMove = FALSE;
@@ -3265,7 +3265,7 @@ void SelectSquadForMovement( INT32 iSquadNumber )
if ( pSoldier && pSoldier->bActive )
{
// is he able & allowed to move? (Report only the first reason for failure encountered)
if ( CanMoveBoxSoldierMoveStrategically( pSoldier, fFirstFailure ) )
if (!fCheckCanMove || CanMoveBoxSoldierMoveStrategically( pSoldier, fFirstFailure ) )
{
SelectSoldierForMovement( pSoldier );
}
@@ -4529,7 +4529,7 @@ void HandleMoveoutOfSectorMovementTroops( void )
if( fSoldierIsMoving[ iCounter ] )
{
// mark this new squad as moving too, so those moving can join it
SelectSquadForMovement( iSquadNumber );
SelectSquadForMovement( iSquadNumber , FALSE);
}
}
else