]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cvar.c
rename VM_hash to VM_crc16, and the extension to DP_QC_CRC16. That way, it is specifi...
[xonotic/darkplaces.git] / cvar.c
diff --git a/cvar.c b/cvar.c
index 98892d70c9def548eaed4ecae627831205b169c9..e51b8d0943d73ec3b865e2bf8c1af36a331a8304 100644 (file)
--- a/cvar.c
+++ b/cvar.c
@@ -260,8 +260,14 @@ void Cvar_SetQuick_Internal (cvar_t *var, const char *value)
                // holds weird values it may cause confusion...
                if (!strcmp(var->name, "_cl_color"))
                {
-                       CL_SetInfo("topcolor", va("%i", (var->integer >> 4) & 15), true, false, false, false);
-                       CL_SetInfo("bottomcolor", va("%i", (var->integer) & 15), true, false, false, false);
+                       int top = (var->integer >> 4) & 15, bottom = var->integer & 15;
+                       CL_SetInfo("topcolor", va("%i", top), true, false, false, false);
+                       CL_SetInfo("bottomcolor", va("%i", bottom), true, false, false, false);
+                       if (cls.protocol != PROTOCOL_QUAKEWORLD && cls.netcon)
+                       {
+                               MSG_WriteByte(&cls.netcon->message, clc_stringcmd);
+                               MSG_WriteString(&cls.netcon->message, va("color %i %i", top, bottom));
+                       }
                }
                else if (!strcmp(var->name, "_cl_rate"))
                        CL_SetInfo("rate", va("%i", var->integer), true, false, false, false);
@@ -666,7 +672,8 @@ void Cvar_Set_f (void)
                return;
        }
 
-       Con_DPrint("Set: ");
+       if (developer.integer >= 100)
+               Con_DPrint("Set: ");
 
        // all looks ok, create/modify the cvar
        Cvar_Get(Cmd_Argv(1), Cmd_Argv(2), 0);
@@ -691,7 +698,8 @@ void Cvar_SetA_f (void)
                return;
        }
 
-       Con_DPrint("SetA: ");
+       if (developer.integer >= 100)
+               Con_DPrint("SetA: ");
 
        // all looks ok, create/modify the cvar
        Cvar_Get(Cmd_Argv(1), Cmd_Argv(2), CVAR_SAVE);