]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/menu/menu.qc
Merge remote-tracking branch 'origin/terencehill/cvar_desc'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / menu.qc
index 71cc021b5ae9cb239afec9395a46e3e2c3f43922..3e45e416492ce6eab51eb631c85d4554f6adf746 100644 (file)
@@ -26,7 +26,7 @@ void() m_init =
        check_unacceptable_compiler_bugs();
 
 #ifdef WATERMARK
-       print(sprintf(_("^4MQC Build information: %s\n"), WATERMARK()));
+       print(sprintf(_("^4MQC Build information: ^1%s\n"), WATERMARK()));
 #endif
 
        // list all game dirs (TEST)
@@ -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
@@ -561,9 +561,11 @@ void() m_draw =
                if(Menu_Active)
                if(!cvar("menu_video_played"))
                {
-                       localcmd("set menu_video_played 1; cd loop $menu_cdtrack; play sound/announcer/default/welcome.ogg\n");
+                       localcmd("cd loop $menu_cdtrack; play sound/announcer/default/welcome.ogg\n");
                        menuLogoAlpha = -0.8; // no idea why, but when I start this at zero, it jumps instead of fading FIXME
                }
+               // ALWAYS set this cvar; if we start but menu is not active, this means we want no background music!
+               localcmd("set menu_video_played 1\n");
        }
 
        t = gettime();