Add BOXER() & ISVIP() macros

This commit is contained in:
Asdow
2024-02-18 12:03:43 +02:00
parent 5fe730b075
commit ab2c5fc10d
10 changed files with 48 additions and 47 deletions
+6 -5
View File
@@ -22,6 +22,7 @@
#include "Font Control.h"
#include "message.h"
#include "GameSettings.h" // added by SANDRO
#include "Soldier macros.h"
INT32 gsBoxerGridNo[ NUM_BOXERS ] = { 11393, 11233, 11073 };
UINT8 gubBoxerID[ NUM_BOXERS ] = { NOBODY, NOBODY, NOBODY };
@@ -55,7 +56,7 @@ void ExitBoxing( void )
if ( pSoldier != NULL )
{
if ( ( pSoldier->flags.uiStatusFlags & SOLDIER_BOXER ) && InARoom( pSoldier->sGridNo, &usRoom ) && usRoom == BOXING_RING )
if ( BOXER(pSoldier) && InARoom( pSoldier->sGridNo, &usRoom ) && usRoom == BOXING_RING )
{
if ( pSoldier->flags.uiStatusFlags & SOLDIER_PC )
{
@@ -239,7 +240,7 @@ void CountPeopleInBoxingRingAndDoActions( void )
{
++ubPlayersInRing;
if ( !pNonBoxingPlayer && !(pSoldier->flags.uiStatusFlags & SOLDIER_BOXER) )
if ( !pNonBoxingPlayer && !BOXER(pSoldier) )
{
pNonBoxingPlayer = pSoldier;
}
@@ -291,7 +292,7 @@ void CountPeopleInBoxingRingAndDoActions( void )
// ladieees and gennleman, we have a fight!
for (uiLoop = 0; uiLoop < 2; ++uiLoop)
{
if (!(pInRing[uiLoop]->flags.uiStatusFlags & SOLDIER_BOXER))
if (!BOXER(pInRing[uiLoop]))
{
// set as boxer!
pInRing[uiLoop]->flags.uiStatusFlags |= SOLDIER_BOXER;
@@ -515,7 +516,7 @@ void BoxingMovementCheck( SOLDIERTYPE * pSoldier )
// someone moving in/into the ring
CountPeopleInBoxingRingAndDoActions();
}
else if ( ( gTacticalStatus.bBoxingState == BOXING ) && ( pSoldier->flags.uiStatusFlags & SOLDIER_BOXER ) )
else if ( ( gTacticalStatus.bBoxingState == BOXING ) && BOXER(pSoldier) )
{
// boxer stepped out of the ring!
BoxingPlayerDisqualified( pSoldier, BOXER_OUT_OF_RING );
@@ -565,7 +566,7 @@ void ClearAllBoxerFlags( void )
{
for (UINT32 uiSlot = 0; uiSlot < guiNumMercSlots; ++uiSlot)
{
if ( MercSlots[ uiSlot ] && MercSlots[ uiSlot ]->flags.uiStatusFlags & SOLDIER_BOXER )
if ( MercSlots[ uiSlot ] && BOXER(MercSlots[ uiSlot ]) )
{
// Flugente: nuke the entire opponent count, remove boxing flag, reevaluate opponent list
DecayIndividualOpplist(MercSlots[uiSlot]);