From: otta8634 Date: Mon, 30 Sep 2024 17:00:30 +0000 (+0800) Subject: Loosen jumpspeed restrictions X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=43b7241eeddde9cd4d0316f3a3c5ac418fec3a0d;p=xonotic%2Fxonotic-data.pk3dir.git Loosen jumpspeed restrictions Now it'll appear whenever z-velocity rises, rather than inconsistently showing up based on whether the player was holding +jump in some cases Also changed hud_panel_physics_speed_vertical description to reflect it doesn't work for jumpspeed --- diff --git a/_hud_descriptions.cfg b/_hud_descriptions.cfg index 28be321ee..4d825891f 100644 --- a/_hud_descriptions.cfg +++ b/_hud_descriptions.cfg @@ -258,7 +258,7 @@ seta hud_panel_physics_text "" "show text in panel (2 = only for speed; 3 = only seta hud_panel_physics_text_scale "" "scale text height by this factor" seta hud_panel_physics_speed_unit_show "" "also show speed unit (NOTE: overriden if both topspeed and jumpspeed are shown)" seta hud_panel_physics_speed_max "" "speed progressbar gets filled up completely by this value (in qu/s)" -seta hud_panel_physics_speed_vertical "" "include the speed on the Z-axis" +seta hud_panel_physics_speed_vertical "" "include the speed on the Z-axis (NOTE: doesn't impact jumpspeed)" seta hud_panel_physics_topspeed "" "also show top speed" seta hud_panel_physics_topspeed_time "" "how many seconds the top speed takes to fade out" diff --git a/qcsrc/client/hud/panel/physics.qc b/qcsrc/client/hud/panel/physics.qc index 6fdb45322..a82175809 100644 --- a/qcsrc/client/hud/panel/physics.qc +++ b/qcsrc/client/hud/panel/physics.qc @@ -177,10 +177,9 @@ void HUD_Physics() } else { - if (vel_phys.z > prev_vel_z && jumpheld && !swimming && alive_player) + if (vel_phys.z > prev_vel_z) { - // NOTE: this includes some situations where the player doesn't explicitly jump (e.g. jumppad, weapon kb) - // excluding them would be difficult. maybe they can be left in? + // NOTE: this includes some situations where the player doesn't explicitly jump jump_speed = prev_speed2d; jump_speed_time = time; }