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:
@@ -3158,8 +3158,8 @@ void HandleBloodCatDeaths( SECTORINFO *pSector )
|
||||
//if ALL the bloodcats are killed
|
||||
if( pSector->bBloodCats == 0 )
|
||||
{
|
||||
UINT8 bId1=-1;
|
||||
UINT8 bId2=-1;
|
||||
SoldierID bId1 = NOBODY;
|
||||
SoldierID bId2 = NOBODY;
|
||||
UINT8 bNum=0;
|
||||
|
||||
SetFactTrue( FACT_PLAYER_KILLED_ALL_BETTYS_BLOODCATS );
|
||||
@@ -3174,13 +3174,13 @@ void HandleBloodCatDeaths( SECTORINFO *pSector )
|
||||
if( bNum != 0 )
|
||||
{
|
||||
//must make sure TEX doesnt say the quote
|
||||
if( bId1 != NOBODY && Menptr[ bId1 ].ubProfile != TEX_UB )
|
||||
if( bId1 != NOBODY && bId1->ubProfile != TEX_UB )
|
||||
{
|
||||
TacticalCharacterDialogue( &Menptr[ bId1 ], QUOTE_UB_HANDLE_BLOODCATDEATHS );
|
||||
TacticalCharacterDialogue( bId1, QUOTE_UB_HANDLE_BLOODCATDEATHS );
|
||||
}
|
||||
else if( bId2 != NOBODY && Menptr[ bId2 ].ubProfile != TEX_UB )
|
||||
else if( bId2 != NOBODY && bId2->ubProfile != TEX_UB )
|
||||
{
|
||||
TacticalCharacterDialogue( &Menptr[ bId2 ], QUOTE_UB_HANDLE_BLOODCATDEATHS );
|
||||
TacticalCharacterDialogue( bId2, QUOTE_UB_HANDLE_BLOODCATDEATHS );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ BOOLEAN SayQuoteFromAllNewHiredMercButDoGastonLast( UINT8 ubProfile, UINT32 uiQu
|
||||
UINT8 RandomArrayOfQualifiedMercs( UINT8 *pRandomSoldierIdArray );
|
||||
|
||||
|
||||
extern UINT8 Get3RandomQualifiedMercs( UINT8 *pSoldierId1, UINT8 *pSoldierId2, UINT8 *pSoldierId3 );
|
||||
extern UINT8 Get3RandomQualifiedMercs( SoldierID *pSoldierId1, SoldierID *pSoldierId2, SoldierID *pSoldierId3 );
|
||||
|
||||
void HandleWhenCertainPercentageOfEnemiesDie();
|
||||
|
||||
@@ -151,4 +151,4 @@ extern void InitGridNoUB();
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user