mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-11 18:50:46 +00:00
In the no-netcode build, don't expose four internal engine functions.
Also don't compile three multiplayer related OSD commands there. git-svn-id: https://svn.eduke32.com/eduke32@4233 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
74f789d083
commit
8a4c5259a8
3 changed files with 19 additions and 13 deletions
|
@ -1213,12 +1213,12 @@ int32_t lineintersect(int32_t x1, int32_t y1, int32_t z1, int32_t x2, int32_t y2
|
|||
|
||||
int32_t rayintersect(int32_t x1, int32_t y1, int32_t z1, int32_t vx, int32_t vy, int32_t vz, int32_t x3,
|
||||
int32_t y3, int32_t x4, int32_t y4, int32_t *intx, int32_t *inty, int32_t *intz);
|
||||
|
||||
#if !defined NETCODE_DISABLE
|
||||
void do_insertsprite_at_headofstat(int16_t spritenum, int16_t statnum);
|
||||
int32_t insertspritestat(int16_t statnum);
|
||||
void do_insertsprite_at_headofsect(int16_t spritenum, int16_t sectnum);
|
||||
void do_deletespritesect(int16_t deleteme);
|
||||
|
||||
#endif
|
||||
int32_t insertsprite(int16_t sectnum, int16_t statnum);
|
||||
int32_t deletesprite(int16_t spritenum);
|
||||
|
||||
|
|
|
@ -8126,10 +8126,16 @@ int32_t getclosestcol(int32_t r, int32_t g, int32_t b)
|
|||
|
||||
////////// SPRITE LIST MANIPULATION FUNCTIONS //////////
|
||||
|
||||
#ifdef NETCODE_DISABLE
|
||||
# define LISTFN_STATIC static
|
||||
#else
|
||||
# define LISTFN_STATIC
|
||||
#endif
|
||||
|
||||
///// sector lists of sprites /////
|
||||
|
||||
// insert sprite at the head of sector list, change .sectnum
|
||||
void do_insertsprite_at_headofsect(int16_t spritenum, int16_t sectnum)
|
||||
LISTFN_STATIC void do_insertsprite_at_headofsect(int16_t spritenum, int16_t sectnum)
|
||||
{
|
||||
int16_t ohead = headspritesect[sectnum];
|
||||
|
||||
|
@ -8143,7 +8149,7 @@ void do_insertsprite_at_headofsect(int16_t spritenum, int16_t sectnum)
|
|||
}
|
||||
|
||||
// remove sprite 'deleteme' from its sector list
|
||||
void do_deletespritesect(int16_t deleteme)
|
||||
LISTFN_STATIC void do_deletespritesect(int16_t deleteme)
|
||||
{
|
||||
int32_t sectnum = sprite[deleteme].sectnum;
|
||||
int32_t prev = prevspritesect[deleteme], next = nextspritesect[deleteme];
|
||||
|
@ -8159,7 +8165,7 @@ void do_deletespritesect(int16_t deleteme)
|
|||
///// now, status lists /////
|
||||
|
||||
// insert sprite at head of status list, change .statnum
|
||||
void do_insertsprite_at_headofstat(int16_t spritenum, int16_t statnum)
|
||||
LISTFN_STATIC void do_insertsprite_at_headofstat(int16_t spritenum, int16_t statnum)
|
||||
{
|
||||
int16_t ohead = headspritestat[statnum];
|
||||
|
||||
|
@ -8173,7 +8179,7 @@ void do_insertsprite_at_headofstat(int16_t spritenum, int16_t statnum)
|
|||
}
|
||||
|
||||
// insertspritestat (internal)
|
||||
int32_t insertspritestat(int16_t statnum)
|
||||
LISTFN_STATIC int32_t insertspritestat(int16_t statnum)
|
||||
{
|
||||
int16_t blanktouse;
|
||||
|
||||
|
|
|
@ -1232,9 +1232,9 @@ static int32_t osdcmd_password(const osdfuncparm_t *parm)
|
|||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
#if !defined NETCODE_DISABLE
|
||||
static int32_t osdcmd_listplayers(const osdfuncparm_t *parm)
|
||||
{
|
||||
#ifndef NETCODE_DISABLE
|
||||
ENetPeer *currentPeer;
|
||||
char ipaddr[32];
|
||||
|
||||
|
@ -1260,13 +1260,12 @@ static int32_t osdcmd_listplayers(const osdfuncparm_t *parm)
|
|||
initprintf("%x %s %s\n", currentPeer->address.host, ipaddr,
|
||||
g_player[(intptr_t)currentPeer->data].user_name);
|
||||
}
|
||||
#endif
|
||||
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
static int32_t osdcmd_kick(const osdfuncparm_t *parm)
|
||||
{
|
||||
#ifndef NETCODE_DISABLE
|
||||
ENetPeer *currentPeer;
|
||||
uint32_t hexaddr;
|
||||
|
||||
|
@ -1299,13 +1298,12 @@ static int32_t osdcmd_kick(const osdfuncparm_t *parm)
|
|||
|
||||
initprintf("Player %s not found!\n", parm->parms[0]);
|
||||
osdcmd_listplayers(NULL);
|
||||
#endif
|
||||
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
static int32_t osdcmd_kickban(const osdfuncparm_t *parm)
|
||||
{
|
||||
#ifndef NETCODE_DISABLE
|
||||
ENetPeer *currentPeer;
|
||||
uint32_t hexaddr;
|
||||
|
||||
|
@ -1344,9 +1342,10 @@ static int32_t osdcmd_kickban(const osdfuncparm_t *parm)
|
|||
|
||||
initprintf("Player %s not found!\n", parm->parms[0]);
|
||||
osdcmd_listplayers(NULL);
|
||||
#endif
|
||||
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
static int32_t osdcmd_cvar_set_game(const osdfuncparm_t *parm)
|
||||
{
|
||||
|
@ -1610,11 +1609,12 @@ int32_t registerosdcommands(void)
|
|||
#ifdef DEBUGGINGAIDS
|
||||
OSD_RegisterFunction("inittimer","debug", osdcmd_inittimer);
|
||||
#endif
|
||||
#if !defined NETCODE_DISABLE
|
||||
OSD_RegisterFunction("kick","kick <id>: kicks a multiplayer client. See listplayers.", osdcmd_kick);
|
||||
OSD_RegisterFunction("kickban","kickban <id>: kicks a multiplayer client and prevents them from reconnecting. See listplayers.", osdcmd_kickban);
|
||||
|
||||
OSD_RegisterFunction("listplayers","listplayers: lists currently connected multiplayer clients", osdcmd_listplayers);
|
||||
|
||||
#endif
|
||||
OSD_RegisterFunction("name","name: change your multiplayer nickname", osdcmd_name);
|
||||
OSD_RegisterFunction("noclip","noclip: toggles clipping mode", osdcmd_noclip);
|
||||
|
||||
|
|
Loading…
Reference in a new issue