diff --git a/src/map.c b/src/map.c index ed65a8e..84deca4 100644 --- a/src/map.c +++ b/src/map.c @@ -160,10 +160,12 @@ static void map_render(double bx, double by, double w, double h) { r, bx, by, w, h); // Draw the system name. - if(map_zoom >= 1.) // Can't be tiny. - gl_printMax(&gl_smallFont, (bx+w)-(x+7. + sys->pos.x * map_zoom), - x + 7. + sys->pos.x * map_zoom + gl_screen.w/2., - y - 5. + sys->pos.y * map_zoom + gl_screen.h/2., + tx = x + 7. + sys->pos.x * map_zoom; + ty = y - 5. + sys->pos.y * map_zoom; + if((map_zoom >= 1.) && // Can't be tiny. + ((tx > bx) && (ty > by) && (ty < by+h-6.))) // Width checking. + gl_printMax(&gl_smallFont, (bx+w)-(tx), + tx + gl_screen.w/2., ty + gl_screen.h/2., &cWhite, sys->name); // Draw the hyperspace paths.