diff options
author | /dev/humancontroller <devhc@example.com> | 2015-02-08 13:55:15 +0100 |
---|---|---|
committer | /dev/humancontroller <devhc@example.com> | 2017-03-09 13:51:18 +0100 |
commit | b392b0d97f3ea048478059873ed6dec8afd9634b (patch) | |
tree | e3fb4a9ef70d89bfb70676fe33f9b493da7051ec /src/server/sv_init.c | |
parent | 65bcf419d4b612b7d626447924fa0fe2079c18c2 (diff) |
implement part 1 of the multi-protocol functionality: protocols
this contains support for connecting via, and serving simultaneously via, any of the three protocols: latest, GPP and 1.1
alternate-1 means protocol 70 (GPP), alternate-2 means protocol 69 (1.1)
relevant cvars:
- net_alternateProtocols
- net_alt{1|2}port[6]
- sv_alt{1|2}master{1|...|5}
- sv_clAltProto{0|..|63}
Diffstat (limited to 'src/server/sv_init.c')
-rw-r--r-- | src/server/sv_init.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/server/sv_init.c b/src/server/sv_init.c index 380a117e..16726b40 100644 --- a/src/server/sv_init.c +++ b/src/server/sv_init.c @@ -626,6 +626,7 @@ Only called at main exe startup, not for each game */ void SV_Init (void) { + int a; int index; SV_AddOperatorCommands (); @@ -668,9 +669,12 @@ void SV_Init (void) sv_allowDownload = Cvar_Get ("sv_allowDownload", "0", CVAR_SERVERINFO); Cvar_Get ("sv_dlURL", "", CVAR_SERVERINFO | CVAR_ARCHIVE); - sv_master[0] = Cvar_Get("sv_master1", MASTER_SERVER_NAME, 0); - for(index = 1; index < MAX_MASTER_SERVERS; index++) - sv_master[index] = Cvar_Get(va("sv_master%d", index + 1), "", CVAR_ARCHIVE); + for (a = 0; a < 3; ++a) + { + sv_masters[a][0] = Cvar_Get(va("sv_%smaster1", (a == 2 ? "alt2" : a == 1 ? "alt1" : "")), MASTER_SERVER_NAME, 0); + for(index = 1; index < MAX_MASTER_SERVERS; index++) + sv_masters[a][index] = Cvar_Get(va("sv_%smaster%d", (a == 2 ? "alt2" : a == 1 ? "alt1" : ""), index + 1), "", CVAR_ARCHIVE); + } sv_reconnectlimit = Cvar_Get ("sv_reconnectlimit", "3", 0); sv_showloss = Cvar_Get ("sv_showloss", "0", 0); |