]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix use of SKINOFFSET_CURSOR
authorterencehill <piuntn@gmail.com>
Sun, 20 Feb 2011 20:44:57 +0000 (21:44 +0100)
committerterencehill <piuntn@gmail.com>
Sun, 20 Feb 2011 20:44:57 +0000 (21:44 +0100)
qcsrc/menu/menu.qc

index 4f0283c93e6587436a4d2109a77e4392127232fa..0894856f1f9e27f0b72334a23940dcd86e88252c 100644 (file)
@@ -350,12 +350,12 @@ float m_allocatetooltipbox(vector pos)
        vector avoidplus, avoidminus;
        vector v;
 
-       avoidplus_x = (SKINAVOID_TOOLTIP_x + SKINSIZE_CURSOR_x - SKINOFFSET_CURSOR_x) / conwidth;
-       avoidplus_y = (SKINAVOID_TOOLTIP_y + SKINSIZE_CURSOR_y - SKINOFFSET_CURSOR_y) / conheight;
+       avoidplus_x = (SKINAVOID_TOOLTIP_x + SKINSIZE_CURSOR_x - SKINOFFSET_CURSOR_x * SKINSIZE_CURSOR_x) / conwidth;
+       avoidplus_y = (SKINAVOID_TOOLTIP_y + SKINSIZE_CURSOR_y - SKINOFFSET_CURSOR_y * SKINSIZE_CURSOR_y) / conheight;
        avoidplus_z = 0;
 
-       avoidminus_x = (SKINAVOID_TOOLTIP_x + SKINOFFSET_CURSOR_x) / conwidth + menuTooltipSize_x;
-       avoidminus_y = (SKINAVOID_TOOLTIP_y + SKINOFFSET_CURSOR_y) / conheight + menuTooltipSize_y;
+       avoidminus_x = (SKINAVOID_TOOLTIP_x + SKINOFFSET_CURSOR_x * SKINSIZE_CURSOR_x) / conwidth + menuTooltipSize_x;
+       avoidminus_y = (SKINAVOID_TOOLTIP_y + SKINOFFSET_CURSOR_y * SKINSIZE_CURSOR_y) / conheight + menuTooltipSize_y;
        avoidminus_z = 0;
 
        // bottom right