mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
Fix UB compilation
This commit is contained in:
@@ -84,7 +84,7 @@ typedef struct
|
||||
//Morris items
|
||||
//UINT32 MORRIS_INSTRUCTION_NOTE = 1362;
|
||||
|
||||
UINT8 Get3RandomQualifiedMercs( UINT8 *pSoldierId1, UINT8 *pSoldierId2, UINT8 *pSoldierId3 );
|
||||
UINT8 Get3RandomQualifiedMercs( SoldierID *pSoldierId1, SoldierID *pSoldierId2, SoldierID *pSoldierId3 );
|
||||
|
||||
//*******************************************************************
|
||||
//
|
||||
@@ -584,7 +584,7 @@ UINT8 RandomArrayOfQualifiedMercs( UINT8 *pRandomSoldierIdArray )
|
||||
return( usNumMercsPresent );
|
||||
}
|
||||
|
||||
UINT8 Get3RandomQualifiedMercs( UINT8 *pSoldierId1, UINT8 *pSoldierId2, UINT8 *pSoldierId3 )
|
||||
UINT8 Get3RandomQualifiedMercs( SoldierID *pSoldierId1, SoldierID *pSoldierId2, SoldierID *pSoldierId3 )
|
||||
{
|
||||
UINT8 usNumMercs;
|
||||
UINT8 RandomSoldierIdArray[ NUM_MERCS_WITH_NEW_QUOTES ];
|
||||
@@ -875,20 +875,20 @@ void HandlePowerGenAlarm()
|
||||
}
|
||||
else
|
||||
{
|
||||
UINT8 bSoldierId1, bSoldierId2, bSoldierId3;
|
||||
SoldierID bSoldierId1, bSoldierId2, bSoldierId3;
|
||||
Get3RandomQualifiedMercs( &bSoldierId1, &bSoldierId2, &bSoldierId3 );
|
||||
|
||||
if( bSoldierId1 != -1 && Menptr[ bSoldierId1 ].ubProfile != BIGGENS_UB ) //BIGGENS
|
||||
if( bSoldierId1 != NOBODY && bSoldierId1->ubProfile != BIGGENS_UB ) //BIGGENS
|
||||
{
|
||||
TacticalCharacterDialogue( &Menptr[ bSoldierId1 ], QUOTE_HATED_1_ON_TEAM_LONGTIMETOHATE );
|
||||
TacticalCharacterDialogue( bSoldierId1, QUOTE_HATED_1_ON_TEAM_LONGTIMETOHATE );
|
||||
}
|
||||
else if( bSoldierId2 != -1 && Menptr[ bSoldierId2 ].ubProfile != BIGGENS_UB ) //BIGGENS
|
||||
else if( bSoldierId2 != NOBODY && bSoldierId2->ubProfile != BIGGENS_UB ) //BIGGENS
|
||||
{
|
||||
TacticalCharacterDialogue( &Menptr[ bSoldierId2 ], QUOTE_HATED_1_ON_TEAM_LONGTIMETOHATE );
|
||||
TacticalCharacterDialogue( bSoldierId2, QUOTE_HATED_1_ON_TEAM_LONGTIMETOHATE );
|
||||
}
|
||||
else if( bSoldierId3 != -1 && Menptr[ bSoldierId3 ].ubProfile != BIGGENS_UB ) // BIGGENS
|
||||
else if( bSoldierId3 != NOBODY && bSoldierId3->ubProfile != BIGGENS_UB ) // BIGGENS
|
||||
{
|
||||
TacticalCharacterDialogue( &Menptr[ bSoldierId3 ], QUOTE_HATED_1_ON_TEAM_LONGTIMETOHATE );
|
||||
TacticalCharacterDialogue( bSoldierId3, QUOTE_HATED_1_ON_TEAM_LONGTIMETOHATE );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user