mirror of
https://github.com/1dot13/source.git
synced 2026-08-12 14:10:23 +02:00
Bugfix: When using a vehicle to move to an enemy sector mercs will force exit the vehicle. In this case the team panel sort order was random depending on which merc was last selected. This problem occurred because the sort function for the squad was not called for this scenario. It is now called whenever a merc is added to a squad.
Because of this the call for the sort function was removed from function SetAssignmentForList(). We do not need to call it twice. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7724 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+4
-1
@@ -378,12 +378,15 @@ BOOLEAN AddCharacterToSquad( SOLDIERTYPE *pCharacter, INT8 bSquadValue )
|
||||
pCharacter->bOldAssignment = bSquadValue;
|
||||
}
|
||||
|
||||
// if current tactical sqaud...upadte panel
|
||||
// if current tactical squad...update panel
|
||||
if( NumberOfPeopleInSquad( ( INT8 )iCurrentTacticalSquad ) == 0 )
|
||||
{
|
||||
SetCurrentSquad( bSquadValue, TRUE );
|
||||
}
|
||||
|
||||
// silversurfer: We need to sort the squad here. Otherwise it will have a random sort order when we force exit a vehicle in an enemy sector.
|
||||
SortSquadByID(bSquadValue);
|
||||
|
||||
if( bSquadValue == ( INT8 ) iCurrentTacticalSquad )
|
||||
{
|
||||
CheckForAndAddMercToTeamPanel( Squad[ iCurrentTacticalSquad ][ bCounter ] );
|
||||
|
||||
Reference in New Issue
Block a user