]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/view.qc
Limit sendcvar calls to one per frame
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / view.qc
index 7c3c1068b1dff2a6a0d096405cdc7d531c307552..ac4d13a6e906d46a292864674ca2ba9bb5255207 100644 (file)
@@ -1562,6 +1562,15 @@ void CSQC_UpdateView(entity this, float w, float h)
 
        lasthud = hud;
 
+       // 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())
+               ReplicateVars_DELAY(0.8 + random() * 0.4); // no need to check cvars every frame
+
        HUD_Scale_Disable();
 
        if(autocvar__hud_showbinds_reload) // menu can set this one