]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/hud/panel/notify.qc
Minor cleanups
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / hud / panel / notify.qc
index 1ea81f69de3b5f855c05979f9a6502ca80471a9e..2f1b254b23fe9712df41297104e02fd69fdecb28 100644 (file)
@@ -58,9 +58,8 @@ void HUD_Notify_Push(string icon, string attacker, string victim)
 
 void HUD_Notify()
 {
-       if (!autocvar__hud_configure)
-               if (!autocvar_hud_panel_notify)
-                       return;
+       if (!autocvar__hud_configure && !autocvar_hud_panel_notify)
+               return;
 
        HUD_Panel_LoadCvars();
 
@@ -69,8 +68,11 @@ void HUD_Notify()
                float minalpha = 1;
                if (notify_count == 0)
                        minalpha = 0; // hide if empty
-               else if(panel_pos.y < scoreboard_bottom)
+               else if (boxesoverlap(panel_pos, panel_pos + panel_size,
+                       eX * scoreboard_left + eY * scoreboard_top, eX * scoreboard_right + eY * scoreboard_bottom))
+               {
                        minalpha = 0.5; // transparent if it may overlap the scoreboard
+               }
                float f = max(minalpha, (1 - scoreboard_fade_alpha));
                if (f <= 0)
                        return;
@@ -84,9 +86,8 @@ void HUD_Notify()
                HUD_Scale_Disable();
        HUD_Panel_DrawBg();
 
-       if (!autocvar__hud_configure)
-               if (notify_count == 0)
-                       return;
+       if (!autocvar__hud_configure && notify_count == 0)
+               return;
 
        vector pos, size;
        pos  = panel_pos;