mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-25 13:51:43 +00:00
Merge branch 'masterserverdualstack' into 'master'
Master Server API v1 URL change See merge request STJr/SRB2!2226
This commit is contained in:
commit
3cb384b10e
1 changed files with 8 additions and 1 deletions
|
@ -61,7 +61,7 @@ static CV_PossibleValue_t masterserver_update_rate_cons_t[] = {
|
||||||
{0,NULL}
|
{0,NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
consvar_t cv_masterserver = CVAR_INIT ("masterserver", "https://mb.srb2.org/MS/0", CV_SAVE|CV_CALL, NULL, MasterServer_OnChange);
|
consvar_t cv_masterserver = CVAR_INIT ("masterserver", "https://ds.ms.srb2.org/MS/0", CV_SAVE|CV_CALL, NULL, MasterServer_OnChange);
|
||||||
consvar_t cv_servername = CVAR_INIT ("servername", "SRB2 server", CV_SAVE|CV_NETVAR|CV_CALL|CV_NOINIT|CV_ALLOWLUA, NULL, Update_parameters);
|
consvar_t cv_servername = CVAR_INIT ("servername", "SRB2 server", CV_SAVE|CV_NETVAR|CV_CALL|CV_NOINIT|CV_ALLOWLUA, NULL, Update_parameters);
|
||||||
|
|
||||||
consvar_t cv_masterserver_update_rate = CVAR_INIT ("masterserver_update_rate", "15", CV_SAVE|CV_CALL|CV_NOINIT, masterserver_update_rate_cons_t, Update_parameters);
|
consvar_t cv_masterserver_update_rate = CVAR_INIT ("masterserver_update_rate", "15", CV_SAVE|CV_CALL|CV_NOINIT, masterserver_update_rate_cons_t, Update_parameters);
|
||||||
|
@ -544,6 +544,13 @@ static void MasterServer_OnChange(void)
|
||||||
CV_StealthSet(&cv_masterserver, cv_masterserver.defaultvalue);
|
CV_StealthSet(&cv_masterserver, cv_masterserver.defaultvalue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (
|
||||||
|
! cv_masterserver.changed &&
|
||||||
|
strcmp(cv_masterserver.string, "https://mb.srb2.org/MS/0") == 0
|
||||||
|
){
|
||||||
|
CV_StealthSet(&cv_masterserver, cv_masterserver.defaultvalue);
|
||||||
|
}
|
||||||
|
|
||||||
Set_api(cv_masterserver.string);
|
Set_api(cv_masterserver.string);
|
||||||
|
|
||||||
if (Online())
|
if (Online())
|
||||||
|
|
Loading…
Reference in a new issue