mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
Add BOXER() & ISVIP() macros
This commit is contained in:
+6
-5
@@ -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]);
|
||||
|
||||
Reference in New Issue
Block a user