changeset 14071:2c01d0796d1d draft

(svn r18614) -Fix [FS#3412](r18602): too many signs were drawn, causing slowdowns
author smatz <smatz@openttd.org>
date Wed, 23 Dec 2009 17:59:34 +0000
parents b60b5954b2a4
children 7a6b0728bf33
files src/viewport.cpp
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/viewport.cpp
+++ b/src/viewport.cpp
@@ -1085,10 +1085,10 @@
 	int sign_height     = ScaleByZoom(VPSM_TOP + FONT_HEIGHT_NORMAL + VPSM_BOTTOM, dpi->zoom);
 	int sign_half_width = ScaleByZoom((small ? sign->width_small : sign->width_normal) / 2, dpi->zoom);
 
-	if (bottom < sign->top &&
-			top    > sign->top + sign_height &&
-			right  < sign->center - sign_half_width &&
-			left   > sign->center + sign_half_width) {
+	if (bottom < sign->top ||
+			top   > sign->top + sign_height ||
+			right < sign->center - sign_half_width ||
+			left  > sign->center + sign_half_width) {
 		return;
 	}