mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-12-02 01:03:50 +00:00
Update server name instantly on change
This commit is contained in:
parent
d228e35fcb
commit
f3ea628fea
1 changed files with 3 additions and 3 deletions
|
@ -206,7 +206,7 @@ static void ServerName_OnChange(void);
|
||||||
|
|
||||||
#define DEF_PORT "28900"
|
#define DEF_PORT "28900"
|
||||||
consvar_t cv_masterserver = {"masterserver", "ms.srb2.org:"DEF_PORT, CV_SAVE, NULL, MasterServer_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_masterserver = {"masterserver", "ms.srb2.org:"DEF_PORT, CV_SAVE, NULL, MasterServer_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||||
consvar_t cv_servername = {"servername", "SRB2 server", CV_SAVE, NULL, ServerName_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_servername = {"servername", "SRB2 server", CV_SAVE|CV_CALL|CV_NOINIT, NULL, ServerName_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
|
||||||
INT16 ms_RoomId = -1;
|
INT16 ms_RoomId = -1;
|
||||||
|
|
||||||
|
@ -978,8 +978,8 @@ void MasterClient_Ticker(void)
|
||||||
|
|
||||||
static void ServerName_OnChange(void)
|
static void ServerName_OnChange(void)
|
||||||
{
|
{
|
||||||
UnregisterServer();
|
if (con_state == MSCS_REGISTERED)
|
||||||
RegisterServer();
|
AddToMasterServer(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void MasterServer_OnChange(void)
|
static void MasterServer_OnChange(void)
|
||||||
|
|
Loading…
Reference in a new issue