From 3bb14d7aed3cc403acba96dd86bfd01d91e86dc6 Mon Sep 17 00:00:00 2001 From: OldFriendEr Date: Fri, 8 Dec 2023 00:29:17 +0200 Subject: [PATCH] fix weapon steadiness bar not working # |<-- Using around 50, Maximum 72 Characters -->| due to a bug the bar only shows up when steadiness is full, problem was that the calculated steadiness was stored in an int while the value was a double resulting in either empty or full bar. # |<---- Limit Each Line to a Maximum Of 72 Characters ---->| # Provide links or keys to any relevant tickets, articles or other resources # Example: fixes #1234, closes #2345, resolves #3456, references #4567 fixes #69954 --- src/ranged.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ranged.cpp b/src/ranged.cpp index b7dc915656ac2..74ed2f22d959a 100644 --- a/src/ranged.cpp +++ b/src/ranged.cpp @@ -1707,7 +1707,7 @@ static std::vector calculate_ranged_chances( const recoil_prediction aim_to_selected = predict_recoil( you, weapon, target, ui.get_sight_dispersion(), ui.get_selected_aim_type(), you.recoil ); - const int selected_steadiness = calc_steadiness( you, weapon, pos, aim_to_selected.recoil ); + const double selected_steadiness = calc_steadiness( you, weapon, pos, aim_to_selected.recoil ); const int throw_moves = throw_cost( you, weapon );