mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
Convert SOLDIERTYPE::ubRobotRemoteHolderID to SoldierID
This commit is contained in:
@@ -2835,7 +2835,7 @@ void RetreatButtonCallback( GUI_BUTTON *btn, INT32 reason )
|
||||
if( gpAR->pRobotCell )
|
||||
{
|
||||
//if robot is retreating, set the retreat time to be the same as the robot's controller.
|
||||
UINT16 ubRobotControllerID;
|
||||
SoldierID ubRobotControllerID;
|
||||
|
||||
ubRobotControllerID = gpAR->pRobotCell->pSoldier->ubRobotRemoteHolderID;
|
||||
|
||||
|
||||
@@ -1595,7 +1595,7 @@ BOOLEAN TacticalCharacterDialogue( SOLDIERTYPE *pSoldier, UINT16 usQuoteNum )
|
||||
{
|
||||
if ( pSoldier->CanRobotBeControlled( ) )
|
||||
{
|
||||
return( TacticalCharacterDialogue( MercPtrs[ pSoldier->ubRobotRemoteHolderID ], usQuoteNum ) );
|
||||
return( TacticalCharacterDialogue( pSoldier->ubRobotRemoteHolderID, usQuoteNum ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -23549,8 +23549,6 @@ BOOLEAN SOLDIERTYPE::IsValidPistolFastShot( INT16 bAimTime, INT32 iTrgGridNo )
|
||||
}
|
||||
BOOLEAN SOLDIERTYPE::CanRobotBeControlled( void )
|
||||
{
|
||||
SOLDIERTYPE *pController;
|
||||
|
||||
if ( !(this->flags.uiStatusFlags & SOLDIER_ROBOT) )
|
||||
{
|
||||
return(FALSE);
|
||||
@@ -23561,7 +23559,7 @@ BOOLEAN SOLDIERTYPE::CanRobotBeControlled( void )
|
||||
return(FALSE);
|
||||
}
|
||||
|
||||
pController = MercPtrs[this->ubRobotRemoteHolderID];
|
||||
SOLDIERTYPE* pController = this->ubRobotRemoteHolderID;
|
||||
|
||||
if ( pController->bActive )
|
||||
{
|
||||
@@ -23665,7 +23663,7 @@ SOLDIERTYPE *SOLDIERTYPE::GetRobotController( void )
|
||||
}
|
||||
else
|
||||
{
|
||||
return(MercPtrs[this->ubRobotRemoteHolderID]);
|
||||
return(this->ubRobotRemoteHolderID);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1428,7 +1428,7 @@ public:
|
||||
INT32 iBurstSoundID;
|
||||
INT8 bSlotItemTakenFrom;
|
||||
UINT16 ubAutoBandagingMedic;
|
||||
UINT16 ubRobotRemoteHolderID;
|
||||
SoldierID ubRobotRemoteHolderID;
|
||||
UINT32 uiTimeOfLastContractUpdate;
|
||||
INT8 bTypeOfLastContract;
|
||||
INT8 bTurnsCollapsed;
|
||||
|
||||
@@ -1825,8 +1825,8 @@ INT8 CalcInterruptDuelPts( SOLDIERTYPE * pSoldier, UINT16 ubOpponentID, BOOLEAN
|
||||
{
|
||||
//iPoints = EffectiveExpLevel( MercPtrs[ pSoldier->ubRobotRemoteHolderID ] ) - 2;
|
||||
// Snap: (do some proper rounding here)
|
||||
iPoints = ( 20*EffectiveExpLevel( MercPtrs[ pSoldier->ubRobotRemoteHolderID ] )
|
||||
+ EffectiveAgility( MercPtrs[ pSoldier->ubRobotRemoteHolderID ], FALSE ) + 15 ) / 30 - 2;
|
||||
iPoints = ( 20*EffectiveExpLevel( pSoldier->ubRobotRemoteHolderID )
|
||||
+ EffectiveAgility( pSoldier->ubRobotRemoteHolderID, FALSE ) + 15 ) / 30 - 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user