diff --git a/polymer/eduke32/build/include/build.h b/polymer/eduke32/build/include/build.h index 3366b5bca..717aa3442 100644 --- a/polymer/eduke32/build/include/build.h +++ b/polymer/eduke32/build/include/build.h @@ -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); diff --git a/polymer/eduke32/build/src/engine.c b/polymer/eduke32/build/src/engine.c index 22417d0fe..1c4326c53 100644 --- a/polymer/eduke32/build/src/engine.c +++ b/polymer/eduke32/build/src/engine.c @@ -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; diff --git a/polymer/eduke32/source/osdcmds.c b/polymer/eduke32/source/osdcmds.c index ba72aed0a..6bb27ec0b 100644 --- a/polymer/eduke32/source/osdcmds.c +++ b/polymer/eduke32/source/osdcmds.c @@ -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 : kicks a multiplayer client. See listplayers.", osdcmd_kick); OSD_RegisterFunction("kickban","kickban : 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);