Use SoldierID

This commit is contained in:
Asdow
2024-11-20 21:17:19 +02:00
parent 29354135dc
commit 9d0ec49e88
2 changed files with 12 additions and 12 deletions
+9 -9
View File
@@ -4310,12 +4310,12 @@ BOOLEAN LoadPlayerGroupList( HWFILE hFile, GROUP **pGroup )
{ {
PLAYERGROUP *pTemp=NULL; PLAYERGROUP *pTemp=NULL;
PLAYERGROUP *pHead=NULL; PLAYERGROUP *pHead=NULL;
UINT32 uiNumberOfNodes=0; UINT32 uiNumberOfNodes=0;
UINT32 uiProfileID=0; UINT32 uiProfileID=0;
UINT32 uiNumBytesRead; UINT32 uiNumBytesRead;
UINT32 cnt=0; UINT32 cnt=0;
INT16 sTempID; SoldierID sTempID;
GROUP *pTempGroup = *pGroup; GROUP *pTempGroup = *pGroup;
// pTemp = pGroup; // pTemp = pGroup;
@@ -4350,10 +4350,10 @@ BOOLEAN LoadPlayerGroupList( HWFILE hFile, GROUP **pGroup )
sTempID = GetSoldierIDFromMercID( pTemp->ubProfileID ); sTempID = GetSoldierIDFromMercID( pTemp->ubProfileID );
//Should never happen //Should never happen
Assert( sTempID != -1 ); Assert( sTempID != NOBODY );
pTemp->ubID = (UINT16) sTempID; pTemp->ubID = sTempID;
pTemp->pSoldier = &Menptr[ pTemp->ubID ]; pTemp->pSoldier = pTemp->ubID;
pTemp->next = NULL; pTemp->next = NULL;
+3 -3
View File
@@ -52,10 +52,10 @@ typedef struct WAYPOINT
typedef struct PLAYERGROUP typedef struct PLAYERGROUP
{ {
UINT8 ubProfileID; //SAVE THIS VALUE ONLY. The others are temp (for quick access) UINT8 ubProfileID; //SAVE THIS VALUE ONLY. The others are temp (for quick access)
UINT16 ubID; //index in the Menptr array SoldierID ubID; //index in the Menptr array
SOLDIERTYPE *pSoldier; //direct access to the soldier pointer SOLDIERTYPE *pSoldier; //direct access to the soldier pointer
UINT8 bFlags; //flags referring to individual player soldiers UINT8 bFlags; //flags referring to individual player soldiers
struct PLAYERGROUP *next; //next player in list struct PLAYERGROUP *next; //next player in list
}PLAYERGROUP; }PLAYERGROUP;