# HG changeset patch # User rubidium # Date 1190227154 0 # Node ID 3fcfa8594d0fc2456fd34943a06855809094df94 # Parent fab936821b10532f4ae6a9d214c42ce19fc56424 (svn r11131) -Fix (r11126): forgot to commit the changes that performed the actual fix. diff -r fab936821b10 -r 3fcfa8594d0f src/newgrf_industries.cpp --- a/src/newgrf_industries.cpp Wed Sep 19 18:15:59 2007 +0000 +++ b/src/newgrf_industries.cpp Wed Sep 19 18:39:14 2007 +0000 @@ -59,12 +59,12 @@ /* When the Y distance between the current row and the 'source' tile * is larger than the best distance, we've found the best distance */ if ((int)TileY(t) - (int)TileY(tile) > best_dist) break; - if (TileX(tile) > TileX(t)) { + if ((int)TileX(t) - (int)TileX(tile) > best_dist) { /* We can safely skip this many tiles; from here all tiles have a * higher or equal distance than the best distance */ t |= MapMaxX(); continue; - } else { + } else if (TileX(tile) < TileX(t)) { /* We can safely skip this many tiles; up to here all tiles have a * higher or equal distance than the best distance */ t += max(best_dist - dist, 0);