Delete the code behind three macros nobody defines

NETWORKED, BOUNDS_CHECKER and UBMODSHADYJOB are not defined in any source file,
in CMakeLists.txt, or on any command line, so all 26 guarded sites were dead.
NETWORKED is the most thoroughly dead of the three: its blocks include
Networking.h, NetworkEvent.h, Communication.h and Application Msg.h, none of
which exist in this repository, so that code could not have compiled since long
before the CMake build. Multiplayer went through Multiplayer/ and RakNet
instead. UBMODSHADYJOB was referenced by a stale comment pointing at
builddefines.h, which is how it turned up.

Removed with unifdef, so the surviving branch of each conditional is kept: the
#ifndef BOUNDS_CHECKER bodies stay, and so does the #else of UBMODSHADYJOB.

The compiler never saw any of this, so nothing shrinks: no object file's
section sizes change, and the only difference in the executables is 24 to 64
assert line numbers shifting by the number of lines removed above them.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Marco Antonio J. Costa
2026-08-22 02:00:21 -03:00
committed by majcosta
co-authored by Claude Opus 5
parent 98c1e6a1f5
commit ddb691318e
14 changed files with 1 additions and 128 deletions
-36
View File
@@ -43,10 +43,6 @@
#include "fov.h"
#include "Soldier macros.h"
#include "soldier tile.h"
#ifdef NETWORKED
#include "Networking.h"
#include "NetworkEvent.h"
#endif
#include "Structure Wrap.h"
#include "Tile Animation.h"
#include "Strategic Merc Handler.h"
@@ -217,10 +213,6 @@ extern BOOLEAN gfSurrendered;
CHAR8 gDebugStr[128];
#ifdef NETWORKED
extern BYTE gfAmIHost;
extern BOOLEAN gfAmINetworked;
#endif
#define NEW_FADE_DELAY 60
@@ -625,10 +617,6 @@ BOOLEAN InitTacticalEngine( )
if ( !InitOverhead( ) ) // Init Overhead
return( FALSE );
#ifdef NETWORKED
if ( !gfAmINetworked )
gfAmIHost = TRUE;
#endif
return( TRUE );
}
@@ -1182,17 +1170,8 @@ BOOLEAN ExecuteOverhead( )
// Handle animation update counters
// ATE: Added additional check here for special value of anispeed that pauses all updates
#ifndef BOUNDS_CHECKER
if ( TIMECOUNTERDONE( pSoldier->timeCounters.UpdateCounter, pSoldier->sAniDelay ) && pSoldier->sAniDelay != 10000 )
#endif
{
#ifdef NETWORKED
// DEF:
// Check for TIMING delay here only if in Realtime
if( gTacticalStatus.uiFlags & REALTIME)
if ( pSoldier->flags.fIsSoldierMoving )
CheckForSlowSoldier( pSoldier );
#endif
// Check if we need to look for items
if ( pSoldier->flags.uiStatusFlags & SOLDIER_LOOKFOR_ITEMS )
@@ -1213,11 +1192,6 @@ BOOLEAN ExecuteOverhead( )
fNoAPsForPendingAction = FALSE;
#ifdef NETWORKED
// Get the path update, if there is 1
if (pSoldier->flags.fSoldierUpdatedFromNetwork)
UpdateSoldierFromNetwork(pSoldier);
#endif
// Check if we are moving and we deduct points and we have no points
if ( !( ( gAnimControl[ pSoldier->usAnimState ].uiFlags & ( ANIM_MOVING | ANIM_SPECIALMOVE ) ) && pSoldier->flags.fNoAPToFinishMove ) && !pSoldier->flags.fPauseAllAnimation )
@@ -1326,10 +1300,6 @@ BOOLEAN ExecuteOverhead( )
dXPos = pSoldier->pathing.sDestXPos;
dYPos = pSoldier->pathing.sDestYPos;
pSoldier->EVENT_SetSoldierPosition( dXPos, dYPos );
#ifdef NETWORKED
// DEF: Test Code
StopSoldierMovementTime(pSoldier);
#endif
// CHECK IF WE HAVE A PENDING ANIMATION
if ( pSoldier->usPendingAnimation != NO_PENDING_ANIMATION )
{
@@ -1835,12 +1805,6 @@ BOOLEAN ExecuteOverhead( )
}
}
#ifdef NETWORKED
if(!pSoldier->flags.fNoAPToFinishMove )
pSoldier->usLastUpdateTime = GetJA2Clock();
if (pSoldier->flags.fSoldierUpdatedFromNetwork)
UpdateSoldierFromNetwork(pSoldier);
#endif
//haydens network soldier update ->>
if(is_client)
UpdateSoldierToNetwork ( pSoldier );