Advertisement
illwieckz

cvar master attempt

Feb 28th, 2022
1,208
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.19 KB | None | 0 0
  1. diff --git a/src/engine/qcommon/gameinfo.cpp b/src/engine/qcommon/gameinfo.cpp
  2. index 1bdf5bc52..5cb911aaf 100644
  3. --- a/src/engine/qcommon/gameinfo.cpp
  4. +++ b/src/engine/qcommon/gameinfo.cpp
  5. @@ -26,9 +26,9 @@ along with Daemon Source Code.  If not, see <http://www.gnu.org/licenses/>.
  6.  #include <string>
  7.  
  8.  #include "gameinfo.h"
  9. +#include "qcommon/cvar.h"
  10.  #include "common/FileSystem.h"
  11.  
  12. -
  13.  Gameinfo& Gameinfo::getInstance()
  14.  {
  15.     static Gameinfo instance;
  16. @@ -70,23 +70,28 @@ void Gameinfo::parse(std::string fname)
  17.         }
  18.         else if(argvec[i] == "MASTERSERVER1")
  19.         {
  20. -           _masterserver1 = argvec[i+1];
  21. +           // _masterserver1 = argvec[i+1];
  22. +           Cvar_Set( "sv_master1", argvec[i+1].c_str() );
  23.         }
  24.         else if(argvec[i] == "MASTERSERVER2")
  25.         {
  26. -           _masterserver2 = argvec[i+1];
  27. +           // _masterserver2 = argvec[i+1];
  28. +           Cvar_Set( "sv_master2", argvec[i+1].c_str() );
  29.         }
  30.         else if(argvec[i] == "MASTERSERVER3")
  31.         {
  32. -           _masterserver3 = argvec[i+1];
  33. +           // _masterserver3 = argvec[i+1];
  34. +           Cvar_Set( "sv_master3", argvec[i+1].c_str() );
  35.         }
  36.         else if(argvec[i] == "MASTERSERVER4")
  37.         {
  38. -           _masterserver4 = argvec[i+1];
  39. +           // _masterserver4 = argvec[i+1];
  40. +           Cvar_Set( "sv_master4", argvec[i+1].c_str() );
  41.         }
  42.         else if(argvec[i] == "MASTERSERVER5")
  43.         {
  44. -           _masterserver5 = argvec[i+1];
  45. +           // _masterserver5 = argvec[i+1];
  46. +           Cvar_Set( "sv_master5", argvec[i+1].c_str() );
  47.         }
  48.         else if(argvec[i] == "WWWBASEURL")
  49.         {
  50. diff --git a/src/engine/server/sv_main.cpp b/src/engine/server/sv_main.cpp
  51. index bab3e586d..e3af1d591 100644
  52. --- a/src/engine/server/sv_main.cpp
  53. +++ b/src/engine/server/sv_main.cpp
  54. @@ -288,8 +288,8 @@ struct MasterServer
  55.     sv_master[ 3 ] = Cvar_Get( "sv_master4", Gameinfo::getInstance().masterserver4().c_str(), 0 );
  56.     sv_master[ 4 ] = Cvar_Get( "sv_master5", Gameinfo::getInstance().masterserver5().c_str(), 0 );
  57.  */
  58. -#define MASTER1_SERVER_NAME "master.unvanquished.net"
  59. -#define MASTER2_SERVER_NAME "master2.unvanquished.net"
  60. +#define MASTER1_SERVER_NAME "" //"master.unvanquished.net"
  61. +#define MASTER2_SERVER_NAME "" //"master2.unvanquished.net"
  62.  #define MASTER3_SERVER_NAME ""
  63.  #define MASTER4_SERVER_NAME ""
  64.  #define MASTER5_SERVER_NAME ""
  65.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement