mirror of
https://github.com/FWGS/xash3d-fwgs
synced 2024-11-27 12:29:53 +01:00
engine: server: remove some totally unused functions
This commit is contained in:
parent
48988e66bd
commit
597027277c
@ -587,7 +587,6 @@ 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_SendMessagesToAll( void );
|
||||
void SV_SkipUpdates( void );
|
||||
|
||||
//
|
||||
|
@ -383,7 +383,7 @@ qboolean SV_CheckIP( netadr_t *adr )
|
||||
static void SV_AddIP_PrintUsage( void )
|
||||
{
|
||||
Con_Printf(S_USAGE "addip <minutes> <ipaddress>\n"
|
||||
S_USAGE_INDENT "addip <minutes> <ipaddress/CIDR>\n"
|
||||
S_USAGE_INDENT "addip <minutes> <ipaddress/CIDR>\n"
|
||||
"Use 0 minutes for permanent\n"
|
||||
"ipaddress A.B.C.D/24 is equivalent to A.B.C.0 and A.B.C\n"
|
||||
"NOTE: IPv6 addresses only support prefix format!\n");
|
||||
@ -392,7 +392,7 @@ static void SV_AddIP_PrintUsage( void )
|
||||
static void SV_RemoveIP_PrintUsage( void )
|
||||
{
|
||||
Con_Printf(S_USAGE "removeip <ipaddress> [removeAll]\n"
|
||||
S_USAGE_INDENT "removeip <ipaddress/CIDR> [removeAll]\n"
|
||||
S_USAGE_INDENT "removeip <ipaddress/CIDR> [removeAll]\n"
|
||||
"Use removeAll to delete all ip filters which ipaddress or ipaddress/CIDR includes\n");
|
||||
}
|
||||
|
||||
|
@ -927,30 +927,6 @@ void SV_SendClientMessages( void )
|
||||
sv.current_client = NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
=======================
|
||||
SV_SendMessagesToAll
|
||||
|
||||
e.g. before changing level
|
||||
=======================
|
||||
*/
|
||||
void SV_SendMessagesToAll( void )
|
||||
{
|
||||
sv_client_t *cl;
|
||||
int i;
|
||||
|
||||
if( sv.state == ss_dead )
|
||||
return;
|
||||
|
||||
for( i = 0, cl = svs.clients; i < svs.maxclients; i++, cl++ )
|
||||
{
|
||||
if( cl->state >= cs_connected )
|
||||
SetBits( cl->flags, FCL_SEND_NET_MESSAGE );
|
||||
}
|
||||
|
||||
SV_SendClientMessages();
|
||||
}
|
||||
|
||||
/*
|
||||
=======================
|
||||
SV_SkipUpdates
|
||||
|
@ -718,29 +718,6 @@ void SV_AddGravity( edict_t *ent )
|
||||
SV_CheckVelocity( ent );
|
||||
}
|
||||
|
||||
/*
|
||||
============
|
||||
SV_AddHalfGravity
|
||||
|
||||
============
|
||||
*/
|
||||
void SV_AddHalfGravity( edict_t *ent, float timestep )
|
||||
{
|
||||
float ent_gravity;
|
||||
|
||||
if( ent->v.gravity )
|
||||
ent_gravity = ent->v.gravity;
|
||||
else ent_gravity = 1.0f;
|
||||
|
||||
// Add 1/2 of the total gravitational effects over this timestep
|
||||
ent->v.velocity[2] -= ( 0.5f * ent_gravity * sv_gravity.value * timestep );
|
||||
ent->v.velocity[2] += ( ent->v.basevelocity[2] * sv.frametime );
|
||||
ent->v.basevelocity[2] = 0.0f;
|
||||
|
||||
// bound velocity
|
||||
SV_CheckVelocity( ent );
|
||||
}
|
||||
|
||||
/*
|
||||
===============================================================================
|
||||
|
||||
|
@ -354,11 +354,6 @@ static void GAME_EXPORT pfnParticle( const float *origin, int color, float life,
|
||||
MSG_WriteByte( &sv.reliable_datagram, bound( 0, life * 8, 255 ));
|
||||
}
|
||||
|
||||
int SV_TestLine( const vec3_t start, const vec3_t end, int flags )
|
||||
{
|
||||
return PM_TestLineExt( svgame.pmove, svgame.pmove->physents, svgame.pmove->numphysent, start, end, flags );
|
||||
}
|
||||
|
||||
static int GAME_EXPORT pfnTestPlayerPosition( float *pos, pmtrace_t *ptrace )
|
||||
{
|
||||
return PM_TestPlayerPosition( svgame.pmove, pos, ptrace, NULL );
|
||||
|
@ -170,46 +170,6 @@ hull_t *SV_HullForBox( const vec3_t mins, const vec3_t maxs )
|
||||
return &box_hull;
|
||||
}
|
||||
|
||||
/*
|
||||
==================
|
||||
SV_HullAutoSelect
|
||||
|
||||
select the apropriate hull automatically
|
||||
==================
|
||||
*/
|
||||
hull_t *SV_HullAutoSelect( model_t *model, const vec3_t mins, const vec3_t maxs, const vec3_t size, vec3_t offset )
|
||||
{
|
||||
float curdiff;
|
||||
float lastdiff = 999;
|
||||
int i, hullNumber = 0; // assume we fail
|
||||
vec3_t clip_size;
|
||||
hull_t *hull;
|
||||
|
||||
// NOTE: this is not matched with hardcoded values in some cases...
|
||||
for( i = 0; i < MAX_MAP_HULLS; i++ )
|
||||
{
|
||||
VectorSubtract( model->hulls[i].clip_maxs, model->hulls[i].clip_mins, clip_size );
|
||||
curdiff = floor( VectorAvg( size )) - floor( VectorAvg( clip_size ));
|
||||
curdiff = fabs( curdiff );
|
||||
|
||||
if( curdiff < lastdiff )
|
||||
{
|
||||
hullNumber = i;
|
||||
lastdiff = curdiff;
|
||||
}
|
||||
}
|
||||
|
||||
// TraceHull stuff
|
||||
hull = &model->hulls[hullNumber];
|
||||
|
||||
// calculate an offset value to center the origin
|
||||
// NOTE: never get offset of drawing hull
|
||||
if( !hullNumber ) VectorCopy( hull->clip_mins, offset );
|
||||
else VectorSubtract( hull->clip_mins, mins, offset );
|
||||
|
||||
return hull;
|
||||
}
|
||||
|
||||
/*
|
||||
==================
|
||||
SV_HullForBsp
|
||||
|
Loading…
Reference in New Issue
Block a user