]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Rearrange operation order to allow constant folding
authorterencehill <piuntn@gmail.com>
Sun, 25 Jun 2017 19:31:21 +0000 (21:31 +0200)
committerterencehill <piuntn@gmail.com>
Sun, 25 Jun 2017 19:31:21 +0000 (21:31 +0200)
qcsrc/client/hud/hud.qh
qcsrc/common/minigames/cl_minigames.qc

index 467a5b33b9f5c23f67ea80dc46b8595c8074629d..ca668f628ebdfd7211f73010ffd7bdb2b9793c70 100644 (file)
@@ -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];
 
index 42f8c514e9bf0166a53bbfdc7c0cad5ccec2f5d9..2e5b30c61cbfae9f5ef5935e4aa4a100e78dd515 100644 (file)
@@ -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);
 }