diff --git a/src/d_clisrv.c b/src/d_clisrv.c index da2093680..bb8522730 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -148,6 +148,9 @@ static boolean cl_redownloadinggamestate = false; #ifdef SATURNPAK boolean is_client_saturn[MAXNETNODES]; +#endif + +#ifdef SATURNJOIN #define ISSATURN 69 #endif @@ -1445,7 +1448,7 @@ static boolean CL_SendJoin(void) netbuffer->u.clientcfg.subversion = SUBVERSION; strncpy(netbuffer->u.clientcfg.application, SRB2APPLICATION, sizeof netbuffer->u.clientcfg.application); -#ifdef SATURNPAK +#ifdef SATURNJOIN netbuffer->u.clientcfg.issaturn = ISSATURN; #endif @@ -4056,7 +4059,7 @@ consvar_t cv_joinrefusemessage = {"joinrefusemessage", "The server is not accept consvar_t cv_allownewplayer = {"allowjoin", "On", CV_SAVE|CV_CALL, CV_OnOff, Joinable_OnChange, 0, NULL, NULL, 0, 0, NULL}; -#ifdef SATURNPAK +#ifdef SATURNJOIN consvar_t cv_allownewsaturnplayer = {"allowsaturnjoin", "On", CV_SAVE|CV_HIDEN, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}; #endif @@ -4105,7 +4108,7 @@ static void Joinable_OnChange(void) if (!server) return; -#ifdef SATURNPAK +#ifdef SATURNJOIN // disabling joins should also disable saturn joins unless its called with CV_StealthSet and vice versa to make life a bit easier if (!cv_allownewplayer.value) CV_Set(&cv_allownewsaturnplayer, "Off"); @@ -4724,7 +4727,7 @@ static void HandleConnect(SINT8 node) { SV_SendRefuse(node, va(M_GetText("Different SRB2Kart versions cannot\nplay a netgame!\n(server version %d.%d)"), VERSION, SUBVERSION)); } -#ifdef SATURNPAK +#ifdef SATURNJOIN else if ((!cv_allownewplayer.value && node && netbuffer->u.clientcfg.issaturn != ISSATURN) || (!cv_allownewsaturnplayer.value && node && netbuffer->u.clientcfg.issaturn == ISSATURN)) #else else if (!cv_allownewplayer.value && node) @@ -5096,7 +5099,6 @@ static void HandlePacketFromAwayNode(SINT8 node) #ifdef SATURNPAK SendSaturnInfo(node); #endif - memset(playeringame, 0, sizeof(playeringame)); for (j = 0; j < MAXPLAYERS; j++) { @@ -6546,13 +6548,12 @@ void NetKeepAlive(void) MasterClient_Ticker(); #endif - #ifdef HOLEPUNCH +#ifdef HOLEPUNCH if (netgame && serverrunning) { RenewHolePunch(); } - #endif - +#endif if (client) { diff --git a/src/d_clisrv.h b/src/d_clisrv.h index b5ad26eea..ed657d75c 100644 --- a/src/d_clisrv.h +++ b/src/d_clisrv.h @@ -371,7 +371,7 @@ typedef struct UINT8 subversion; // Contains build version UINT8 localplayers; // number of splitscreen players UINT8 mode; -#ifdef SATURNPAK +#ifdef SATURNJOIN UINT8 issaturn; #endif } ATTRPACK clientconfig_pak; @@ -579,7 +579,7 @@ extern consvar_t cv_joinnextround, #endif cv_netticbuffer, cv_allownewplayer, -#ifdef SATURNPAK +#ifdef SATURNJOIN cv_allownewsaturnplayer, #endif cv_joinrefusemessage, cv_maxplayers, cv_resynchattempts, cv_resynchcooldown, cv_gamestateattempts, cv_blamecfail, cv_maxsend, cv_noticedownload, cv_downloadspeed; diff --git a/src/d_netcmd.c b/src/d_netcmd.c index 2ed74ec2f..15a9ced5c 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -795,7 +795,7 @@ void D_RegisterServerCommands(void) CV_RegisterVar(&cv_httpsource); #ifndef NONET CV_RegisterVar(&cv_allownewplayer); -#ifdef SATURNPAK +#ifdef SATURNJOIN CV_RegisterVar(&cv_allownewsaturnplayer); #endif CV_RegisterVar(&cv_joinrefusemessage); diff --git a/src/doomdef.h b/src/doomdef.h index 8d491ee76..43b663a24 100644 --- a/src/doomdef.h +++ b/src/doomdef.h @@ -579,10 +579,16 @@ extern const char *compdate, *comptime, *comprevision, *compbranch; // None of these that are disabled in the normal build are guaranteed to work perfectly // Compile them at your own risk! +//-- SATURN __\\ /// Server detection for if a connecting client is on Saturn. -/// For stuff like extra synching, joinblock, etc. +/// For stuff like extra synching, etc. //#define SATURNPAK +/// Detect if a client is on Saturn in the clientconfig. +/// To seperately allow them to join or block joining from vanilla clients. +//#define SATURNJOIN +//-- <( ̄︶ ̄)> __\\ + /// Undefine to use the new method of Gamma correction see colour cube in v_video.c #define BACKWARDSCOMPATCORRECTION