]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/hud/hud_config.qc
Hud editor: show a "Center line" checkbox in the hud editor menu
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / hud / hud_config.qc
index 8bdf0c4b8cdca708c3f1de89082c5d72b7a3183d..726b2e78d9565097699d67bcb5a46018d8194d33 100644 (file)
@@ -1133,6 +1133,8 @@ void HUD_Panel_HlCenterLine(float myBorder)
        for (int i = 0; i < n; ++i)
        {
                float xpos_rel = stof(argv(i));
+               if (xpos_rel <= 0 || xpos_rel >= 1)
+                       continue;
                float ofs = fabs(panel_centerpos_x / vid_conwidth - xpos_rel);
                if (ofs < 0.02) // don't bother showing the center line if it's evident that the panel is not centered
                {