diff --git a/src/d_clisrv.c b/src/d_clisrv.c index 63393690..97e6e700 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -2920,7 +2920,9 @@ static void Got_KickCmd(UINT8 **p, INT32 playernum) } consvar_t cv_allownewplayer = {"allowjoin", "On", CV_NETVAR, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL }; +#ifdef VANILLAJOINNEXTROUND consvar_t cv_joinnextround = {"joinnextround", "Off", CV_NETVAR, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}; /// \todo not done +#endif static CV_PossibleValue_t maxplayers_cons_t[] = {{2, "MIN"}, {MAXPLAYERS, "MAX"}, {0, NULL}}; consvar_t cv_maxplayers = {"maxplayers", "8", CV_SAVE, maxplayers_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; static CV_PossibleValue_t resynchattempts_cons_t[] = {{0, "MIN"}, {20, "MAX"}, {0, NULL}}; @@ -2966,7 +2968,9 @@ void D_ClientServerInit(void) RegisterNetXCmd(XD_ADDPLAYER, Got_AddPlayer); #ifndef NONET CV_RegisterVar(&cv_allownewplayer); +#ifdef VANILLAJOINNEXTROUND CV_RegisterVar(&cv_joinnextround); +#endif CV_RegisterVar(&cv_showjoinaddress); CV_RegisterVar(&cv_resynchattempts); CV_RegisterVar(&cv_blamecfail); @@ -3519,8 +3523,10 @@ static void HandleConnect(SINT8 node) // you get a free second before desynch checks. use it wisely. SV_InitResynchVars(node); +#ifdef VANILLAJOINNEXTROUND if (cv_joinnextround.value && gameaction == ga_nothing) G_SetGamestate(GS_WAITINGPLAYERS); +#endif if (!SV_SendServerConfig(node)) { G_SetGamestate(backupstate); diff --git a/src/d_clisrv.h b/src/d_clisrv.h index c8e8b008..e2a6ed7c 100644 --- a/src/d_clisrv.h +++ b/src/d_clisrv.h @@ -497,7 +497,11 @@ extern UINT32 realpingtable[MAXPLAYERS]; extern UINT32 playerpingtable[MAXPLAYERS]; #endif -extern consvar_t cv_joinnextround, cv_allownewplayer, cv_maxplayers, cv_resynchattempts, cv_blamecfail, cv_maxsend, cv_noticedownload, cv_downloadspeed; +extern consvar_t +#ifdef VANILLAJOINNEXTROUND + cv_joinnextround, +#endif + cv_allownewplayer, cv_maxplayers, cv_resynchattempts, cv_blamecfail, cv_maxsend, cv_noticedownload, cv_downloadspeed; // Used in d_net, the only dependence tic_t ExpandTics(INT32 low); diff --git a/src/m_menu.c b/src/m_menu.c index 071fdc42..bfb039c4 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -1537,7 +1537,9 @@ static menuitem_t OP_ServerOptionsMenu[] = #ifndef NONET {IT_STRING | IT_CVAR, NULL, "Max. Player Count", &cv_maxplayers, 90}, {IT_STRING | IT_CVAR, NULL, "Allow Players to Join", &cv_allownewplayer, 100}, - //{IT_STRING | IT_CVAR, NULL, "Join on Map Change", &cv_joinnextround, 110}, +#ifdef VANILLAJOINNEXTROUND + {IT_STRING | IT_CVAR, NULL, "Join on Map Change", &cv_joinnextround, 110}, +#endif {IT_STRING | IT_CVAR, NULL, "Allow WAD Downloading", &cv_downloading, 110}, {IT_STRING | IT_CVAR, NULL, "Attempts to resynchronise", &cv_resynchattempts, 120},