mirror of
https://github.com/1dot13/source.git
synced 2026-08-19 14:20:30 +02:00
Convert to SoldierID
This commit is contained in:
@@ -2380,9 +2380,9 @@ void RandomMercInGroupSaysQuote( GROUP *pGroup, UINT16 usQuoteNum )
|
||||
{
|
||||
PLAYERGROUP *pPlayer;
|
||||
SOLDIERTYPE *pSoldier;
|
||||
UINT16 ubMercsInGroup[ CODE_MAXIMUM_NUMBER_OF_PLAYER_SLOTS ];
|
||||
UINT16 ubNumMercs = 0;
|
||||
UINT16 ubChosenMerc;
|
||||
SoldierID ubMercsInGroup[ CODE_MAXIMUM_NUMBER_OF_PLAYER_SLOTS ];
|
||||
UINT16 ubNumMercs = 0;
|
||||
UINT16 ubChosenMerc;
|
||||
|
||||
|
||||
// if traversing tactically, don't do this, unless time compression was required for some reason (don't go to sector)
|
||||
@@ -2414,7 +2414,7 @@ void RandomMercInGroupSaysQuote( GROUP *pGroup, UINT16 usQuoteNum )
|
||||
if ( ubNumMercs > 0 )
|
||||
{
|
||||
ubChosenMerc = (UINT16)Random( ubNumMercs );
|
||||
pSoldier = MercPtrs[ ubMercsInGroup[ ubChosenMerc ] ];
|
||||
pSoldier = ubMercsInGroup[ ubChosenMerc ];
|
||||
|
||||
TacticalCharacterDialogue( pSoldier, usQuoteNum );
|
||||
}
|
||||
|
||||
@@ -1416,7 +1416,7 @@ void FindOutIfAnyMercAboutToLeaveIsGonnaRenew( void )
|
||||
SOLDIERTYPE *pSoldier = NULL, *pSoldierWhoWillQuit = NULL;
|
||||
INT32 iCounter= 0, iNumberOnTeam = 0;
|
||||
// WDS - make number of mercenaries, etc. be configurable
|
||||
UINT16 ubPotentialMercs[ CODE_MAXIMUM_NUMBER_OF_PLAYER_SLOTS ] = { 0 };
|
||||
SoldierID ubPotentialMercs[ CODE_MAXIMUM_NUMBER_OF_PLAYER_SLOTS ] = { 0 };
|
||||
UINT16 ubNumMercs = 0;
|
||||
UINT16 ubChosenMerc;
|
||||
|
||||
@@ -1499,15 +1499,16 @@ void FindOutIfAnyMercAboutToLeaveIsGonnaRenew( void )
|
||||
if ( ubNumMercs > 0 )
|
||||
{
|
||||
ubChosenMerc = (UINT16)Random( ubNumMercs );
|
||||
SOLDIERTYPE *pChosenSoldier = ubPotentialMercs[ubChosenMerc];
|
||||
|
||||
SpecialCharacterDialogueEvent( DIALOGUE_SPECIAL_EVENT_LOCK_INTERFACE,1 ,MAP_SCREEN ,0 ,0 ,0 );
|
||||
HandleImportantMercQuote( MercPtrs[ ubPotentialMercs[ ubChosenMerc ] ], QUOTE_CONTRACTS_OVER );
|
||||
HandleImportantMercQuote( pChosenSoldier, QUOTE_CONTRACTS_OVER );
|
||||
SpecialCharacterDialogueEvent( DIALOGUE_SPECIAL_EVENT_LOCK_INTERFACE,0 ,MAP_SCREEN ,0 ,0 ,0 );
|
||||
|
||||
AddReasonToWaitingListQueue( CONTRACT_EXPIRE_WARNING_REASON );
|
||||
TacticalCharacterDialogueWithSpecialEvent( MercPtrs[ ubPotentialMercs[ ubChosenMerc ] ], 0, DIALOGUE_SPECIAL_EVENT_SHOW_UPDATE_MENU, 0,0 );
|
||||
TacticalCharacterDialogueWithSpecialEvent( pChosenSoldier, 0, DIALOGUE_SPECIAL_EVENT_SHOW_UPDATE_MENU, 0,0 );
|
||||
|
||||
MercPtrs[ ubPotentialMercs[ ubChosenMerc ] ]->ubContractRenewalQuoteCode = SOLDIER_CONTRACT_RENEW_QUOTE_89_USED;
|
||||
pChosenSoldier->ubContractRenewalQuoteCode = SOLDIER_CONTRACT_RENEW_QUOTE_89_USED;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2558,15 +2558,16 @@ void CheckForRobotAndIfItsControlled( void )
|
||||
// search for the robot on player's team
|
||||
for( i = gTacticalStatus.Team[ OUR_TEAM ].bFirstID; i <= gTacticalStatus.Team[ OUR_TEAM ].bLastID; i++ )
|
||||
{
|
||||
if( MercPtrs[ i ]->bActive && MercPtrs[ i ]->stats.bLife && AM_A_ROBOT( MercPtrs[ i ] ))
|
||||
SOLDIERTYPE *pSoldier = MercPtrs[i];
|
||||
if( pSoldier->bActive && pSoldier->stats.bLife && AM_A_ROBOT( pSoldier ))
|
||||
{
|
||||
// check whether it has a valid controller with it. This sets its ubRobotRemoteHolderID field.
|
||||
MercPtrs[ i ]->UpdateRobotControllerGivenRobot( );
|
||||
pSoldier->UpdateRobotControllerGivenRobot( );
|
||||
|
||||
// if he has a controller, set controllers
|
||||
if ( MercPtrs[ i ]->ubRobotRemoteHolderID != NOBODY )
|
||||
if ( pSoldier->ubRobotRemoteHolderID != NOBODY )
|
||||
{
|
||||
MercPtrs[ MercPtrs[ i ]->ubRobotRemoteHolderID ]->UpdateRobotControllerGivenController( );
|
||||
pSoldier->ubRobotRemoteHolderID->UpdateRobotControllerGivenController( );
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
@@ -14656,7 +14656,7 @@ void SortListOfMercsInTeamPanel( BOOLEAN fRetainSelectedMercs, BOOLEAN fReverse
|
||||
INT32 iCounter = 0, iCounterA = 0;
|
||||
INT16 sEndSectorA, sEndSectorB;
|
||||
INT32 iExpiryTime, iExpiryTimeA;
|
||||
UINT16 uiID, uiIDA;
|
||||
SoldierID uiID, uiIDA;
|
||||
SOLDIERTYPE *pSelectedSoldier[ CODE_MAXIMUM_NUMBER_OF_PLAYER_SLOTS ];
|
||||
SOLDIERTYPE *pCurrentSoldier = NULL;
|
||||
SOLDIERTYPE *pPreviousSelectedInfoChar = NULL;
|
||||
@@ -15859,7 +15859,7 @@ void CancelPathsOfAllSelectedCharacters()
|
||||
// if we've clicked on a selected valid character
|
||||
if( ( gCharactersList[ bCounter ].fValid == TRUE ) && IsEntryInSelectedListSet( bCounter ) )
|
||||
{
|
||||
pSoldier = MercPtrs[ gCharactersList[ bCounter ].usSolID ];
|
||||
pSoldier = gCharactersList[ bCounter ].usSolID;
|
||||
|
||||
// and he has a route set
|
||||
if ( GetLengthOfMercPath( pSoldier ) > 0 )
|
||||
@@ -16283,10 +16283,10 @@ void RandomAwakeSelectedMercConfirmsStrategicMove( void )
|
||||
SOLDIERTYPE *pSoldier = NULL;
|
||||
INT32 iCounter;
|
||||
// WDS - make number of mercenaries, etc. be configurable
|
||||
UINT16 ubSelectedMercID[ CODE_MAXIMUM_NUMBER_OF_PLAYER_SLOTS ];
|
||||
UINT16 ubSelectedMercIndex[ CODE_MAXIMUM_NUMBER_OF_PLAYER_SLOTS ];
|
||||
UINT16 ubNumMercs = 0;
|
||||
UINT16 ubChosenMerc;
|
||||
SoldierID ubSelectedMercID[ CODE_MAXIMUM_NUMBER_OF_PLAYER_SLOTS ];
|
||||
UINT16 ubSelectedMercIndex[ CODE_MAXIMUM_NUMBER_OF_PLAYER_SLOTS ];
|
||||
UINT16 ubNumMercs = 0;
|
||||
UINT16 ubChosenMerc;
|
||||
|
||||
|
||||
for( iCounter = 0; iCounter < giMAXIMUM_NUMBER_OF_PLAYER_SLOTS; iCounter++ )
|
||||
@@ -16313,7 +16313,7 @@ void RandomAwakeSelectedMercConfirmsStrategicMove( void )
|
||||
// select that merc so that when he speaks we're showing his portrait and not someone else
|
||||
ChangeSelectedInfoChar( ubSelectedMercIndex[ ubChosenMerc ], FALSE );
|
||||
|
||||
MercPtrs[ ubSelectedMercID[ ubChosenMerc ] ]->DoMercBattleSound( BATTLE_SOUND_OK1 );
|
||||
ubSelectedMercID[ ubChosenMerc ]->DoMercBattleSound( BATTLE_SOUND_OK1 );
|
||||
//TacticalCharacterDialogue( MercPtrs[ ubSelectedMercID[ ubChosenMerc ] ], ubQuoteNum );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user