]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Stop server from requesting cvar values to the client on connection as it's no longer...
authorterencehill <piuntn@gmail.com>
Mon, 19 Aug 2019 22:07:08 +0000 (00:07 +0200)
committerterencehill <piuntn@gmail.com>
Mon, 19 Aug 2019 22:07:08 +0000 (00:07 +0200)
qcsrc/client/view.qc
qcsrc/common/state.qc
qcsrc/server/command/cmd.qc
qcsrc/server/miscfunctions.qc
qcsrc/server/mutators/events.qh

index ac4d13a6e906d46a292864674ca2ba9bb5255207..203fbcc76c0c6cc410d2faab61a41f7c513f9c72 100644 (file)
@@ -1565,7 +1565,6 @@ void CSQC_UpdateView(entity this, float w, float h)
        // TODO maybe don't send cvar values until the menu is open
        // TODO remove CheckSendCvars from menu code (it seems broken anyway)
        // TODO remove references to sendcvar from cvar descriptions
-       // TODO stop server from requesting cvar values to the client on connection as it's no longer necessary
 
        ReplicateVars(false);
        if (ReplicateVars_NOT_SENDING())
index 2a1168eae017978fe7f56d72004bda716fc49344..24c0b7c6f4dc6789415ce61b639bde0a68848664 100644 (file)
@@ -38,8 +38,6 @@ void ClientState_attach(entity this)
 {
        this._cs = NEW(ClientState, this);
 
-    GetCvars(this, CS(this), 0);  // get other cvars from player
-
        // TODO: fold all of these into ClientState
 
        DecodeLevelParms(this);
index 1395986b97bd3a463ab33c16e8508da381f992ca..911012a8566856b02c10fb4769a721be3876b129 100644 (file)
@@ -328,7 +328,7 @@ void ClientCommand_physics(entity caller, int request, int argc)
 
                        if (Physics_Valid(command) || command == "default")
                        {
-                               stuffcmd(caller, strcat("\nseta cl_physics ", command, "\nsendcvar cl_physics\n"));
+                               stuffcmd(caller, strcat("\nseta cl_physics ", command, "\n"));
                                sprint(caller, strcat("^2Physics set successfully changed to ^3", command, "\n"));
                                return;
                        }
index 522840e763679681c641ccd3f271122db8012ea3..854e39781f11794e7c3aca8c3065f8761d8630b5 100644 (file)
@@ -429,6 +429,9 @@ void GetCvars(entity this, entity store, int f)
 {
        string s = string_null;
 
+       if (f == 0)
+               LOG_INFO("Warning: requesting cvar values is deprecated. Client should send them automatically using REPLICATE.\n");
+
        if (f > 0)
                s = strcat1(argv(f));
 
index cd09b1defd7ff9051dd5d96e041fd9c303561d0d..1ca629078e4a99d27076c5292e1aade918bf5996 100644 (file)
@@ -306,6 +306,7 @@ MUTATOR_HOOKABLE(PlayerPreThink, EV_PlayerPreThink);
 MUTATOR_HOOKABLE(GetPressedKeys, EV_GetPressedKeys);
 
 /** is meant to call GetCvars_handle*(get_cvars_s, get_cvars_f, cvarfield, "cvarname") for cvars this mutator needs from the client */
+// NOTE: requesting cvar values (get_cvars_f 0) is deprecated
 #define EV_GetCvars(i, o) \
     /**/ i(float, get_cvars_f) \
     /**/ i(string, get_cvars_s) \