simplify masterserver type selection

Use a plain cubescript variable instead of a commandline switch.

mastertype
  0: classic direct TCP connection
  1: HTTP connection (via proxy) (default)

DOCREF mastertype "--mastertype="
This commit is contained in:
ac-stef
2017-05-22 20:44:58 +02:00
parent 2bc8936680
commit 1afd7515ab
4 changed files with 5 additions and 10 deletions
+3 -1
View File
@@ -1325,9 +1325,11 @@ int progress_callback_retrieveservers(void *data, float progress)
return interceptkey(SDLK_ESCAPE) ? 1 : 0;
}
VARP(mastertype, 0, 1, 1); // 0: TCP direct, 1: HTTP proxy
void retrieveservers(vector<char> &data)
{
if(mastertype == AC_MASTER_HTTP)
if(mastertype)
{
httpget h;
defformatstring(progresstext)("resolving %s", mastername);