Browse Source

engine: server: static-ize few game API functions, set GAME_EXPORT attribute

pull/2/head
Alibek Omarov 2 years ago
parent
commit
c966589a50
  1. 3
      engine/server/server.h
  2. 34
      engine/server/sv_game.c

3
engine/server/server.h

@ -653,15 +653,12 @@ void SV_SendUserReg( sizebuf_t *msg, sv_user_message_t *user ); @@ -653,15 +653,12 @@ void SV_SendUserReg( sizebuf_t *msg, sv_user_message_t *user );
int pfnIndexOfEdict( const edict_t *pEdict );
void pfnWriteBytes( const byte *bytes, int count );
void SV_UpdateBaseVelocity( edict_t *ent );
byte *pfnSetFatPVS( const float *org );
byte *pfnSetFatPAS( const float *org );
int pfnPrecacheModel( const char *s );
int pfnModelIndex( const char *m );
void pfnRemoveEntity( edict_t* e );
void SV_RestartAmbientSounds( void );
void SV_RestartDecals( void );
void SV_RestartStaticEnts( void );
int pfnGetCurrentPlayer( void );
int pfnDropToFloor( edict_t* e );
edict_t *SV_EdictNum( int n );
char *SV_Localinfo( void );

34
engine/server/sv_game.c

@ -4188,6 +4188,21 @@ void GAME_EXPORT SV_PlaybackEventFull( int flags, const edict_t *pInvoker, word @@ -4188,6 +4188,21 @@ void GAME_EXPORT SV_PlaybackEventFull( int flags, const edict_t *pInvoker, word
}
}
/*
=============
pfnGetCurrentPlayer
=============
*/
static int GAME_EXPORT pfnGetCurrentPlayer( void )
{
int idx = sv.current_client - svs.clients;
if( idx < 0 || idx >= svs.maxclients )
return -1;
return idx;
}
/*
=============
pfnSetFatPVS
@ -4196,7 +4211,7 @@ The client will interpolate the view position, @@ -4196,7 +4211,7 @@ The client will interpolate the view position,
so we can't use a single PVS point
=============
*/
byte *pfnSetFatPVS( const float *org )
static byte * GAME_EXPORT pfnSetFatPVS( const float *org )
{
qboolean fullvis = false;
@ -4247,7 +4262,7 @@ The client will interpolate the hear position, @@ -4247,7 +4262,7 @@ The client will interpolate the hear position,
so we can't use a single PHS point
=============
*/
byte *pfnSetFatPAS( const float *org )
static byte * GAME_EXPORT pfnSetFatPAS( const float *org )
{
qboolean fullvis = false;
@ -4355,21 +4370,6 @@ int GAME_EXPORT pfnCanSkipPlayer( const edict_t *player ) @@ -4355,21 +4370,6 @@ int GAME_EXPORT pfnCanSkipPlayer( const edict_t *player )
return FBitSet( cl->flags, FCL_LOCAL_WEAPONS ) ? true : false;
}
/*
=============
pfnGetCurrentPlayer
=============
*/
int GAME_EXPORT pfnGetCurrentPlayer( void )
{
int idx = sv.current_client - svs.clients;
if( idx < 0 || idx >= svs.maxclients )
return -1;
return idx;
}
/*
=============
pfnSetGroupMask

Loading…
Cancel
Save