From 3f0cd5dc22a8f19edaf17509696fa5fd8024590d Mon Sep 17 00:00:00 2001 From: terencehill Date: Sun, 25 Jun 2017 21:31:21 +0200 Subject: [PATCH] Rearrange operation order to allow constant folding --- qcsrc/client/hud/hud.qh | 4 ++-- qcsrc/common/minigames/cl_minigames.qc | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/qcsrc/client/hud/hud.qh b/qcsrc/client/hud/hud.qh index 467a5b33b..ca668f628 100644 --- a/qcsrc/client/hud/hud.qh +++ b/qcsrc/client/hud/hud.qh @@ -31,7 +31,7 @@ REGISTER_REGISTRY(hud_panels) panel.current_panel_bg, \ HUD_Scale(panel_size + '1 1 0' * 2 * panel_bg_border), \ panel_bg_color, panel_bg_alpha, \ - HUD_Scale('1 1 0' * (panel_bg_border/BORDER_MULTIPLIER)) \ + HUD_Scale('1 1 0' * BORDER_MULTIPLIER * panel_bg_border) \ ); \ } MACRO_END @@ -81,7 +81,7 @@ float resizeCorner; // 1 = topleft, 2 = topright, 3 = bottomleft, 4 = bottomrigh entity highlightedPanel; float highlightedAction; // 0 = nothing, 1 = move, 2 = resize -const float BORDER_MULTIPLIER = 0.25; +const float BORDER_MULTIPLIER = 4; float scoreboard_bottom; int weapon_accuracy[Weapons_MAX]; diff --git a/qcsrc/common/minigames/cl_minigames.qc b/qcsrc/common/minigames/cl_minigames.qc index 42f8c514e..2e5b30c61 100644 --- a/qcsrc/common/minigames/cl_minigames.qc +++ b/qcsrc/common/minigames/cl_minigames.qc @@ -8,7 +8,7 @@ void minigame_hud_simpleboard(vector pos, vector mySize, string board_texture) panel.current_panel_bg, mySize + '1 1 0' * 2 * panel_bg_border, panel_bg_color, panel_bg_alpha, - '1 1 0' * (panel_bg_border/BORDER_MULTIPLIER)); + '1 1 0' * BORDER_MULTIPLIER * panel_bg_border); drawpic(pos, board_texture, mySize, '1 1 1', panel_bg_alpha, DRAWFLAG_NORMAL); } -- 2.39.2