diff --git a/src/d_clisrv.c b/src/d_clisrv.c index 714ff90c9..c1ef6211a 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -145,8 +145,9 @@ consvar_t cv_mindelay = {"mindelay", "0", CV_SAVE, mindelay_cons_t, NULL, 0, NUL consvar_t cv_gentlemens = {"gentlemensdelay", "Off", CV_SAVE|CV_CALL|CV_NOINIT, CV_OnOff, Lagless_OnChange, 0, NULL, NULL, 0, 0, NULL}; // this should be a netvar Zzz... // allows a fake player to appear on the ms and serverlist when your dedi server is empty -consvar_t cv_usefakeseed = {"fakeseed", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}; -consvar_t cv_fakeseedname = {"fakeseedname", "Player 1", CV_SAVE, NULL, NULL, 0, NULL, NULL, 0, 0, NULL}; +static void FakeSeed_OnChange(void); +consvar_t cv_usefakeseed = {"fakeseed", "Off", CV_SAVE|CV_CALL|CV_NOINIT, CV_OnOff, FakeSeed_OnChange, 0, NULL, NULL, 0, 0, NULL}; +consvar_t cv_fakeseedname = {"fakeseedname", "Player 1", CV_SAVE|CV_CALL|CV_NOINIT, NULL, FakeSeed_OnChange, 0, NULL, NULL, 0, 0, NULL}; SINT8 nodetoplayer[MAXNETNODES]; SINT8 nodetoplayer2[MAXNETNODES]; // say the numplayer for this node if any (splitscreen) @@ -245,6 +246,13 @@ consvar_t cv_httpsource = {"http_source", "", CV_SAVE, NULL, NULL, 0, NULL, NULL consvar_t cv_kicktime = {"kicktime", "10", CV_SAVE, CV_Unsigned, NULL, 0, NULL, NULL, 0, 0, NULL}; +static void FakeSeed_OnChange(void) +{ +#ifdef MASTERSERVER + Update_MS(); +#endif +} + static boolean UseLocalDelay(void) { if (dedicated || (server && server_lagless && !cv_mindelay.value) || modeattacking == ATTACKING_RECORD) diff --git a/src/mserv.c b/src/mserv.c index c7eb50442..e60d556e2 100644 --- a/src/mserv.c +++ b/src/mserv.c @@ -608,10 +608,17 @@ Update_parameters (void) } #endif/*MASTERSERVER*/ } + +#ifdef MASTERSERVER +void Update_MS(void) +{ + Update_parameters(); +} +#endif + #ifdef MASTERSERVER static void MasterServer_OnChange(void) { - UnregisterServer(); Set_api(cv_masterserver.string); diff --git a/src/mserv.h b/src/mserv.h index a8de2152f..c89ececd2 100644 --- a/src/mserv.h +++ b/src/mserv.h @@ -88,6 +88,8 @@ char *GetMODVersion(int id); #endif char *GetMasterServerRules(void); + +void Update_MS(void); #endif void AddMServCommands(void);