From 0a9e5afdb76d9b3611791658e1723e796df0b58b Mon Sep 17 00:00:00 2001 From: Samual Lenks Date: Sat, 25 Jan 2014 17:41:10 -0500 Subject: [PATCH] Rename the toggle cvar to have a suffix so that playing on old servers with the feature enabled is not broken --- defaultXonotic.cfg | 2 +- qcsrc/client/View.qc | 2 +- qcsrc/client/autocvars.qh | 2 +- qcsrc/menu/xonotic/dialog_settings_game_view.c | 8 ++++---- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/defaultXonotic.cfg b/defaultXonotic.cfg index 9df05d2df..b9817ca1b 100644 --- a/defaultXonotic.cfg +++ b/defaultXonotic.cfg @@ -60,7 +60,7 @@ seta cl_reticle_stretch 0 "whether to stretch reticles so they fit the screen (b seta cl_reticle_item_nex 1 "draw aiming reticle for the nex weapon's zoom, 0 disables and values between 0 and 1 change alpha" seta cl_reticle_item_normal 1 "draw reticle when zooming with the zoom button, 0 disables and values between 0 and 1 change alpha" fov 100 -seta cl_velocityzoom 0 "velocity based zooming of fov" +seta cl_velocityzoom_enabled 0 "velocity based zooming of fov" seta cl_velocityzoom_factor 0 "factor of fov zooming (negative values zoom out)" seta cl_velocityzoom_type 3 "how to factor in speed, 1 = all velocity in all directions, 2 = velocity only in forward direction (can be negative), 3 = velocity only in forward direction (limited to forward only)" seta cl_velocityzoom_speed 1000 "target speed for fov factoring" diff --git a/qcsrc/client/View.qc b/qcsrc/client/View.qc index 1a84d28de..191d55ad6 100644 --- a/qcsrc/client/View.qc +++ b/qcsrc/client/View.qc @@ -164,7 +164,7 @@ vector GetCurrentFov(float fov) makevectors(view_angles); - if(autocvar_cl_velocityzoom && autocvar_cl_velocityzoom_type && autocvar_cl_velocityzoom_factor) // _type = 0 disables velocity zoom too + if(autocvar_cl_velocityzoom_enabled && autocvar_cl_velocityzoom_type && autocvar_cl_velocityzoom_factor) // _type = 0 disables velocity zoom too { if(intermission) { curspeed = 0; } else diff --git a/qcsrc/client/autocvars.qh b/qcsrc/client/autocvars.qh index f904f68e8..abd95d954 100644 --- a/qcsrc/client/autocvars.qh +++ b/qcsrc/client/autocvars.qh @@ -76,7 +76,7 @@ float autocvar_cl_stripcolorcodes; var float autocvar_cl_vehicle_spiderbot_cross_alpha = 0.6; var float autocvar_cl_vehicle_spiderbot_cross_size = 1; var float autocvar_cl_vehicles_hud_tactical = 1; -float autocvar_cl_velocityzoom; +float autocvar_cl_velocityzoom_enabled; float autocvar_cl_velocityzoom_factor; var float autocvar_cl_velocityzoom_type = 3; float autocvar_cl_velocityzoom_speed; diff --git a/qcsrc/menu/xonotic/dialog_settings_game_view.c b/qcsrc/menu/xonotic/dialog_settings_game_view.c index 4b36c3f7f..7c5299d88 100644 --- a/qcsrc/menu/xonotic/dialog_settings_game_view.c +++ b/qcsrc/menu/xonotic/dialog_settings_game_view.c @@ -111,15 +111,15 @@ void XonoticGameViewSettingsTab_fill(entity me) me.TD(me, 1, 2, e = makeXonoticSlider(0, 1, 0.1, "cl_zoomsensitivity")); me.TR(me); me.TR(me); - me.TD(me, 1, 1, e = makeXonoticCheckBox(0, "cl_velocityzoom", _("Velocity zoom"))); + me.TD(me, 1, 1, e = makeXonoticCheckBox(0, "cl_velocityzoom_enabled", _("Velocity zoom"))); me.TD(me, 1, 2, e = makeXonoticCheckBoxEx(3, 1, "cl_velocityzoom_type", _("Forward movement only"))); - setDependent(e, "cl_velocityzoom", 1, 1); + setDependent(e, "cl_velocityzoom_enabled", 1, 1); me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, ZCTX(_("VZOOM^Factor")))); - setDependentAND(e, "cl_velocityzoom", 1, 1, "cl_velocityzoom_type", 1, 3); + setDependentAND(e, "cl_velocityzoom_enabled", 1, 1, "cl_velocityzoom_type", 1, 3); me.TD(me, 1, 2, e = makeXonoticSlider(-1, 1, 0.1, "cl_velocityzoom_factor")); - setDependentAND(e, "cl_velocityzoom", 1, 1, "cl_velocityzoom_type", 1, 3); + setDependentAND(e, "cl_velocityzoom_enabled", 1, 1, "cl_velocityzoom_type", 1, 3); me.TR(me); me.TR(me); //me.TDempty(me, 0.2); -- 2.39.2