Browse Source

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

master
Alibek Omarov 5 months ago
parent
commit
8c61a2f021
  1. 1
      engine/client/cl_parse.c
  2. 1
      engine/common/common.h
  3. 22
      engine/server/server.h
  4. 5
      engine/server/sv_client.c
  5. 2
      engine/server/sv_cmds.c
  6. 11
      engine/server/sv_init.c
  7. 19
      engine/server/sv_main.c

1
engine/client/cl_parse.c

@ -21,7 +21,6 @@ GNU General Public License for more details. @@ -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

1
engine/common/common.h

@ -777,6 +777,7 @@ int COM_FileSize( const char *filename ); @@ -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 );

22
engine/server/server.h

@ -487,25 +487,16 @@ int SV_ModelIndex( const char *name ); @@ -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 ); @@ -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 ); @@ -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 ); @@ -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 ); @@ -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 ); @@ -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 ); @@ -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 ); @@ -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 );

5
engine/server/sv_client.c

@ -43,6 +43,7 @@ typedef struct ucmd_s @@ -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 @@ -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[] = @@ -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;

2
engine/server/sv_cmds.c

@ -638,7 +638,7 @@ static void SV_EntPatch_f( void ) @@ -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;

11
engine/server/sv_init.c

@ -27,6 +27,17 @@ server_t sv; // local server @@ -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

19
engine/server/sv_main.c

@ -299,7 +299,7 @@ SV_ProcessFile @@ -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 @@ -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 ) @@ -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 ) @@ -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 @@ -1053,7 +1042,7 @@ SV_FreeClients
release server clients
================
*/
void SV_FreeClients( void )
static void SV_FreeClients( void )
{
if( svs.maxclients != 0 )
{

Loading…
Cancel
Save