From: terencehill Date: Sat, 15 Jan 2011 15:57:42 +0000 (+0100) Subject: Rename *_z cvars in *_vertical to work around a bug in autocvars parsing: a float... X-Git-Tag: xonotic-v0.5.0~321 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=14d4a377d5e55828bf70041564e4fb456577f625;p=xonotic%2Fxonotic-data.pk3dir.git Rename *_z cvars in *_vertical to work around a bug in autocvars parsing: a float autocvar ending with _z is always read as 0 --- diff --git a/defaultXonotic.cfg b/defaultXonotic.cfg index 6617176f7..bb4474062 100644 --- a/defaultXonotic.cfg +++ b/defaultXonotic.cfg @@ -1425,11 +1425,11 @@ seta hud_panel_engineinfo_framecounter_exponentialmovingaverage_instantupdate_ch seta hud_panel_physics_speed_unit 3 "speed unit (1 = qu/s, 2 = m/s, 3 = km/h, 4 = mph, 5 = knots)" seta hud_panel_physics_speed_unit_show 1 "also show speed unit" seta hud_panel_physics_speed_max 1800 "speed progressbar gets filled up completely by this value (in qu/s)" -seta hud_panel_physics_speed_z 0 "include the speed on the Z-axis" +seta hud_panel_physics_speed_vertical 0 "include the speed on the Z-axis" seta hud_panel_physics_topspeed 1 "also show top speed" seta hud_panel_physics_topspeed_time 4 "how many seconds the top speed takes to fade out" seta hud_panel_physics_acceleration_max 2 "acceleration progressbar gets filled up completely by this value" -seta hud_panel_physics_acceleration_z 0 "include the acceleration on the Z-axis" +seta hud_panel_physics_acceleration_vertical 0 "include the acceleration on the Z-axis" seta hud_showbinds 1 "what to show in the HUD to indicate certain keys to press: 0 display commands, 1 bound keys, 2 both" seta hud_showbinds_limit 2 "maximum number of bound keys to show for a command. 0 for unlimited" diff --git a/qcsrc/client/autocvars.qh b/qcsrc/client/autocvars.qh index 4a5696369..4635407cb 100644 --- a/qcsrc/client/autocvars.qh +++ b/qcsrc/client/autocvars.qh @@ -191,14 +191,14 @@ float autocvar_hud_panel_notify_time; float autocvar_hud_panel_physics; float autocvar_hud_panel_physics_progressbar_acceleration_mode; float autocvar_hud_panel_physics_acceleration_max; -float autocvar_hud_panel_physics_acceleration_z; +float autocvar_hud_panel_physics_acceleration_vertical; float autocvar_hud_panel_physics_baralign; float autocvar_hud_panel_physics_flip; float autocvar_hud_panel_physics_progressbar; float autocvar_hud_panel_physics_speed_max; float autocvar_hud_panel_physics_speed_unit; float autocvar_hud_panel_physics_speed_unit_show; -float autocvar_hud_panel_physics_speed_z; +float autocvar_hud_panel_physics_speed_vertical; float autocvar_hud_panel_physics_topspeed; float autocvar_hud_panel_physics_topspeed_time; float autocvar_hud_panel_powerups; diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index e90ba56ae..afdd8b4b7 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -4244,7 +4244,7 @@ void HUD_Physics(void) float max_speed = floor( autocvar_hud_panel_physics_speed_max * conversion_factor + 0.5 ); if (autocvar__hud_configure) speed = floor( max_speed * 0.65 + 0.5 ); - else if(autocvar_hud_panel_physics_speed_z) + else if(autocvar_hud_panel_physics_speed_vertical) speed = floor( vlen(pmove_vel) * conversion_factor + 0.5 ); else speed = floor( vlen(pmove_vel - pmove_vel_z * '0 0 1') * conversion_factor + 0.5 ); @@ -4256,7 +4256,7 @@ void HUD_Physics(void) else { f = time - acc_prevtime; - if(autocvar_hud_panel_physics_acceleration_z) + if(autocvar_hud_panel_physics_acceleration_vertical) acceleration = (vlen(pmove_vel) - vlen(acc_prevspeed)) * (1 / f); else acceleration = (vlen(pmove_vel - '0 0 1' * pmove_vel_z) - vlen(acc_prevspeed - '0 0 1' * acc_prevspeed_z)) * (1 / f); diff --git a/qcsrc/menu/xonotic/dialog_hudpanel_physics.c b/qcsrc/menu/xonotic/dialog_hudpanel_physics.c index 8277b5e85..ae3767e5d 100644 --- a/qcsrc/menu/xonotic/dialog_hudpanel_physics.c +++ b/qcsrc/menu/xonotic/dialog_hudpanel_physics.c @@ -91,7 +91,7 @@ void XonoticHUDPhysicsDialog_fill(entity me) //speed me.TR(me); me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Speed:")); - me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_panel_physics_speed_z", "Include vertical speed")); + me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_panel_physics_speed_vertical", "Include vertical speed")); // me.TR(me); // me.TDempty(me, 0.2); // me.TD(me, 1, 1.8, e = makeXonoticTextLabel(0, "Full status bar at:")); @@ -120,7 +120,7 @@ void XonoticHUDPhysicsDialog_fill(entity me) //acceleration me.TR(me); me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Acceleration:")); - me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_panel_physics_acceleration_z", "Include vertical acc.")); + me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_panel_physics_acceleration_vertical", "Include vertical acc.")); // me.TR(me); // me.TDempty(me, 0.2); // me.TD(me, 1, 1.8, e = makeXonoticTextLabel(0, "Full status bar at:"));