From: terencehill Date: Fri, 11 Dec 2020 17:31:47 +0000 (+0100) Subject: Improve alpha sync of Accuracy and Item Stats panels with the scoreboard X-Git-Tag: xonotic-v0.8.5~588^2~4 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=686654c34d1ef5c77fb8be756ab732c0bac9c0c9;p=xonotic%2Fxonotic-data.pk3dir.git Improve alpha sync of Accuracy and Item Stats panels with the scoreboard --- diff --git a/qcsrc/client/hud/panel/scoreboard.qc b/qcsrc/client/hud/panel/scoreboard.qc index ad923c5dd..3649415cc 100644 --- a/qcsrc/client/hud/panel/scoreboard.qc +++ b/qcsrc/client/hud/panel/scoreboard.qc @@ -1166,13 +1166,7 @@ bool Scoreboard_WouldDraw() float average_accuracy; vector Scoreboard_AccuracyStats_Draw(vector pos, vector rgb, vector bg_size) { - if (frametime) - { - if (scoreboard_fade_alpha < 1) - scoreboard_acc_fade_alpha = min(1, scoreboard_acc_fade_alpha + frametime * 10); - else - scoreboard_acc_fade_alpha = 1; // sync fading with the scoreboard - } + scoreboard_acc_fade_alpha = min(scoreboard_fade_alpha, scoreboard_acc_fade_alpha + frametime * 10); vector initial_pos = pos; WepSet weapons_stat = WepSet_GetFromStat(); @@ -1335,13 +1329,7 @@ STATIC_INIT(default_order_items_label) vector Scoreboard_ItemStats_Draw(vector pos, vector rgb, vector bg_size) { - if (frametime) - { - if (scoreboard_fade_alpha < 1) - scoreboard_itemstats_fade_alpha = min(1, scoreboard_itemstats_fade_alpha + frametime * 10); - else - scoreboard_itemstats_fade_alpha = 1; // sync fading with the scoreboard - } + scoreboard_itemstats_fade_alpha = min(scoreboard_fade_alpha, scoreboard_itemstats_fade_alpha + frametime * 10); vector initial_pos = pos; int disowned_cnt = 0;