code cleanup

This commit is contained in:
Crow-bar
2022-04-03 18:00:12 +03:00
parent 64020b2902
commit cd37d866c2
31 changed files with 172 additions and 128 deletions

View File

@@ -54,13 +54,13 @@ extern int SV_UPDATE_BACKUP;
#define GROUP_OP_AND 0
#define GROUP_OP_NAND 1
#if defined( NDEBUG ) || XASH_OPT
#if defined( NDEBUG )
#define SV_IsValidEdict( e ) ( e && !e->free )
#else
#define SV_IsValidEdict( e ) SV_CheckEdict( e, __FILE__, __LINE__ )
#endif
#define NUM_FOR_EDICT(e) ((int)((edict_t *)(e) - svgame.edicts))
#if XASH_OPT
#if XASH_EXT_OPT == 2
#define EDICT_NUM( num ) ( ( ( ( num ) >= 0 ) && ( ( num ) < GI->max_edicts) ) ? svgame.edicts + ( num ) : NULL )
#else
#define EDICT_NUM( num ) SV_EdictNum( num )
@@ -480,7 +480,7 @@ void Master_Packet( void );
//
void SV_ActivateServer( int runPhysics );
qboolean SV_SpawnServer( const char *server, const char *startspot, qboolean background );
#if XASH_OPT
#if XASH_EXT_OPT == 2
#define SV_ModelHandle( modelindex ) ( ( modelindex < 0 || modelindex >= MAX_MODELS ) ? NULL : sv.models[( modelindex )] )
model_t *pfnSV_ModelHandle( int modelindex );
#else
@@ -499,7 +499,7 @@ qboolean SV_RunThink( edict_t *ent );
qboolean SV_PlayerRunThink( edict_t *ent, float frametime, double time );
qboolean SV_TestEntityPosition( edict_t *ent, edict_t *blocker );
void SV_Impact( edict_t *e1, edict_t *e2, trace_t *trace );
#if XASH_OPT
#if XASH_EXT_OPT == 2
// filter movetypes to collide with
#define SV_CanPushed( ent ) ( ( ent )->v.movetype == MOVETYPE_NONE || \
( ent )->v.movetype == MOVETYPE_PUSH || \
@@ -652,7 +652,7 @@ void SV_RestartAmbientSounds( void );
void SV_RestartDecals( void );
void SV_RestartStaticEnts( void );
int pfnGetCurrentPlayer( void );
#if !XASH_OPT
#if XASH_EXT_OPT != 2
edict_t *SV_EdictNum( int n );
#endif
char *SV_Localinfo( void );