engine: server: cleanup server.h header from unused functions prototypes

This commit is contained in:
Alibek Omarov 2024-01-28 11:35:53 +03:00
parent 0b24810927
commit 8c61a2f021
7 changed files with 21 additions and 40 deletions

View File

@ -21,7 +21,6 @@ GNU General Public License for more details.
#include "shake.h"
#include "hltv.h"
#include "input.h"
#include "server.h"
#if XASH_LOW_MEMORY != 2
int CL_UPDATE_BACKUP = SINGLEPLAYER_BACKUP;
#endif

View File

@ -777,6 +777,7 @@ int COM_FileSize( const char *filename );
void COM_FreeFile( void *buffer );
int COM_CompareFileTime( const char *filename1, const char *filename2, int *iCompare );
char *va( const char *format, ... ) _format( 1 );
qboolean CRC32_MapFile( dword *crcvalue, const char *filename, qboolean multiplayer );
// soundlib shared exports
qboolean S_Init( void );

View File

@ -487,25 +487,16 @@ int SV_ModelIndex( const char *name );
int SV_SoundIndex( const char *name );
int SV_EventIndex( const char *name );
int SV_GenericIndex( const char *name );
int SV_CalcPacketLoss( sv_client_t *cl );
void SV_ExecuteUserCommand (char *s);
void SV_InitOperatorCommands( void );
void SV_KillOperatorCommands( void );
void SV_RemoteCommand( netadr_t from, sizebuf_t *msg );
void SV_PrepWorldFrame( void );
void SV_ProcessFile( sv_client_t *cl, const char *filename );
void SV_SendResource( resource_t *pResource, sizebuf_t *msg );
void SV_SendResourceList( sv_client_t *cl );
void SV_AddToMaster( netadr_t from, sizebuf_t *msg );
qboolean SV_ProcessUserAgent( netadr_t from, const char *useragent );
void Host_SetServerState( int state );
qboolean SV_IsSimulating( void );
void SV_FreeClients( void );
//
// sv_init.c
//
qboolean CRC32_MapFile( dword *crcvalue, const char *filename, qboolean multiplayer );
qboolean SV_InitGame( void );
void SV_ActivateServer( int runPhysics );
qboolean SV_SpawnServer( const char *server, const char *startspot, qboolean background );
@ -537,14 +528,11 @@ void SV_WaterMove( edict_t *ent );
//
void SV_SendClientMessages( void );
void SV_ClientPrintf( sv_client_t *cl, const char *fmt, ... ) _format( 2 );
void SV_BroadcastCommand( const char *fmt, ... ) _format( 1 );
//
// sv_client.c
//
char *SV_StatusString( void );
void SV_RefreshUserinfo( void );
void SV_GetChallenge( netadr_t from );
void SV_TogglePause( const char *msg );
qboolean SV_ShouldUpdatePing( sv_client_t *cl );
const char *SV_GetClientIDString( sv_client_t *cl );
@ -554,15 +542,12 @@ void SV_FullClientUpdate( sv_client_t *cl, sizebuf_t *msg );
void SV_FullUpdateMovevars( sv_client_t *cl, sizebuf_t *msg );
void SV_GetPlayerStats( sv_client_t *cl, int *ping, int *packet_loss );
void SV_SendServerdata( sizebuf_t *msg, sv_client_t *cl );
void SV_ClientThink( sv_client_t *cl, usercmd_t *cmd );
void SV_ExecuteClientMessage( sv_client_t *cl, sizebuf_t *msg );
void SV_ConnectionlessPacket( netadr_t from, sizebuf_t *msg );
edict_t *SV_FakeConnect( const char *netname );
void SV_ExecuteClientCommand( sv_client_t *cl, const char *s );
void SV_BuildReconnect( sizebuf_t *msg );
qboolean SV_IsPlayerIndex( int idx );
int SV_CalcPing( sv_client_t *cl );
void SV_InitClientMove( void );
void SV_UpdateServerInfo( void );
void SV_EndRedirect( host_redirect_t *rd );
void SV_RejectConnection( netadr_t from, const char *fmt, ... ) _format( 2 );
@ -571,8 +556,6 @@ void SV_GetPlayerCount( int *clients, int *bots );
//
// sv_cmds.c
//
void SV_Status_f( void );
void SV_Newgame_f( void );
void SV_InitHostCommands( void );
//
@ -594,7 +577,6 @@ void SV_RequestMissingResources( void );
// sv_filter.c
//
void SV_InitFilter( void );
void SV_ShutdownFilter( void );
qboolean SV_CheckIP( netadr_t *adr );
qboolean SV_CheckID( const char *id );
@ -603,8 +585,6 @@ qboolean SV_CheckID( const char *id );
//
void SV_InactivateClients( void );
int SV_FindBestBaselineForStatic( int index, entity_state_t **baseline, entity_state_t *to );
void SV_WriteFrameToClient( sv_client_t *client, sizebuf_t *msg );
void SV_BuildClientFrame( sv_client_t *client );
void SV_SkipUpdates( void );
//
@ -677,6 +657,7 @@ void SV_ClearGameState( void );
//
// sv_pmove.c
//
void SV_InitClientMove( void );
qboolean SV_PlayerIsFrozen( edict_t *pClient );
void SV_RunCmd( sv_client_t *cl, usercmd_t *ucmd, int random_seed );
@ -687,7 +668,6 @@ void SV_ClearWorld( void );
void SV_UnlinkEdict( edict_t *ent );
void SV_ClipMoveToEntity( edict_t *ent, const vec3_t start, vec3_t mins, vec3_t maxs, const vec3_t end, trace_t *trace );
void SV_CustomClipMoveToEntity( edict_t *ent, const vec3_t start, vec3_t mins, vec3_t maxs, const vec3_t end, trace_t *trace );
trace_t SV_TraceHull( edict_t *ent, int hullNum, const vec3_t start, vec3_t mins, vec3_t maxs, const vec3_t end );
trace_t SV_Move( const vec3_t start, vec3_t mins, vec3_t maxs, const vec3_t end, int type, edict_t *e, qboolean monsterclip );
trace_t SV_MoveNoEnts( const vec3_t start, vec3_t mins, vec3_t maxs, const vec3_t end, int type, edict_t *e );
const char *SV_TraceTexture( edict_t *ent, const vec3_t start, const vec3_t end );

View File

@ -43,6 +43,7 @@ typedef struct ucmd_s
static int g_userid = 1;
static void SV_UserinfoChanged( sv_client_t *cl );
static void SV_ExecuteClientCommand( sv_client_t *cl, const char *s );
/*
=================
@ -84,7 +85,7 @@ flood the server with invalid connection IPs. With a
challenge, they must give a valid IP address.
=================
*/
void SV_GetChallenge( netadr_t from )
static void SV_GetChallenge( netadr_t from )
{
int i, oldest = 0;
double oldestTime;
@ -3040,7 +3041,7 @@ ucmd_t enttoolscmds[] =
SV_ExecuteUserCommand
==================
*/
void SV_ExecuteClientCommand( sv_client_t *cl, const char *s )
static void SV_ExecuteClientCommand( sv_client_t *cl, const char *s )
{
ucmd_t *u;

View File

@ -638,7 +638,7 @@ static void SV_EntPatch_f( void )
SV_Status_f
================
*/
void SV_Status_f( void )
static void SV_Status_f( void )
{
sv_client_t *cl;
int i;

View File

@ -27,6 +27,17 @@ server_t sv; // local server
server_static_t svs; // persistant server info
svgame_static_t svgame; // persistant game info
/*
==================
Host_SetServerState
==================
*/
static void Host_SetServerState( int state )
{
Cvar_FullSet( "host_serverstate", va( "%i", state ), FCVAR_READ_ONLY );
sv.state = state;
}
/*
================
SV_AddResource

View File

@ -299,7 +299,7 @@ SV_ProcessFile
process incoming file (customization)
=================
*/
void SV_ProcessFile( sv_client_t *cl, const char *filename )
static void SV_ProcessFile( sv_client_t *cl, const char *filename )
{
customization_t *pList;
resource_t *resource;
@ -541,7 +541,7 @@ This has to be done before the world logic, because
player processing happens outside RunWorldFrame
================
*/
void SV_PrepWorldFrame( void )
static void SV_PrepWorldFrame( void )
{
edict_t *ent;
int i;
@ -563,7 +563,7 @@ void SV_PrepWorldFrame( void )
SV_IsSimulating
=================
*/
qboolean SV_IsSimulating( void )
static qboolean SV_IsSimulating( void )
{
if( sv.background && SV_Active() && CL_Active())
{
@ -712,17 +712,6 @@ void Host_ServerFrame( void )
NET_MasterHeartbeat ();
}
/*
==================
Host_SetServerState
==================
*/
void Host_SetServerState( int state )
{
Cvar_FullSet( "host_serverstate", va( "%i", state ), FCVAR_READ_ONLY );
sv.state = state;
}
//============================================================================
/*
=================
@ -1053,7 +1042,7 @@ SV_FreeClients
release server clients
================
*/
void SV_FreeClients( void )
static void SV_FreeClients( void )
{
if( svs.maxclients != 0 )
{