Convert to SoldierID

This commit is contained in:
Asdow
2024-11-17 23:45:48 +02:00
parent d149b6ffea
commit b74ccf3ddc
45 changed files with 376 additions and 375 deletions
+1 -1
View File
@@ -1091,7 +1091,7 @@ void EnemyHeliSAMCheck( INT16 id )
// also check whether this sector is not enemy-controlled - we can't have the AI shooting at its own helis
if ( pSAMStrategicMap && !pSAMStrategicMap->fEnemyControlled )
{
UINT16 ubBestSAMOperatorID = NOBODY;
SoldierID ubBestSAMOperatorID = NOBODY;
FLOAT samcth = GetBestSAMOperatorCTH_Player( gpSamSectorX[i], gpSamSectorY[i], 0, &ubBestSAMOperatorID );
// cth is reduced if SAM is damaged, even if it can still operate
+1 -1
View File
@@ -3776,7 +3776,7 @@ UINT32 CalculateSnitchInterrogationValue(SOLDIERTYPE *pSoldier, UINT16 *pusMaxPt
}
// Flugente: Determine the best cth with SAMs in a sector, and which merc has that cth if present
FLOAT GetBestSAMOperatorCTH_Player( INT16 sSectorX, INT16 sSectorY, INT16 sSectorZ, UINT16 *pubID )
FLOAT GetBestSAMOperatorCTH_Player( INT16 sSectorX, INT16 sSectorY, INT16 sSectorZ, SoldierID *pubID )
{
// if nobody is here, nobody can fire
FLOAT bestsamcth = 0.0f;
+2 -2
View File
@@ -318,7 +318,7 @@ UINT32 CalculatePrisonGuardValue(SOLDIERTYPE *pSoldier );
UINT32 CalculateSnitchInterrogationValue(SOLDIERTYPE *pSoldier, UINT16 *pusMaxPts );
// Flugente: Determine the best cth with SAMs in a sector, and which merc has that cth if present
FLOAT GetBestSAMOperatorCTH_Player( INT16 sSectorX, INT16 sSectorY, INT16 sSectorZ, UINT16 *pubID );
FLOAT GetBestSAMOperatorCTH_Player( INT16 sSectorX, INT16 sSectorY, INT16 sSectorZ, SoldierID *pubID );
INT16 GetTrainWorkerPts(SOLDIERTYPE *pSoldier);
@@ -592,4 +592,4 @@ UINT8 CalcSoldierNeedForSleep( SOLDIERTYPE *pSoldier );
// Flugente: administration assignment
FLOAT GetAdministrationPercentage( INT16 sX, INT16 sY );
#endif
#endif
+1 -3
View File
@@ -3009,9 +3009,7 @@ void MercCellMouseClickCallback( MOUSE_REGION *reg, INT32 reason )
if( gpAR->pRobotCell )
{ //if controller is retreating, make the robot retreat too.
UINT16 ubRobotControllerID;
ubRobotControllerID = gpAR->pRobotCell->pSoldier->ubRobotRemoteHolderID;
SoldierID ubRobotControllerID = gpAR->pRobotCell->pSoldier->ubRobotRemoteHolderID;
if( ubRobotControllerID == NOBODY )
{