From: terencehill Date: Sun, 25 Jun 2017 19:31:21 +0000 (+0200) Subject: Rearrange operation order to allow constant folding X-Git-Tag: xonotic-v0.8.5~2694 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=3f0cd5dc22a8f19edaf17509696fa5fd8024590d;p=xonotic%2Fxonotic-data.pk3dir.git Rearrange operation order to allow constant folding --- 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); }