mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-16 00:12:51 +00:00
(svn r14416) -Fix (r10074)(r10517): substraction was done the other way in the 'nearest land/water' check (~25% performance penalty)
This commit is contained in:
parent
1c126cb2e6
commit
8c5cfd6850
@ -73,7 +73,7 @@ static uint GetClosestWaterDistance(TileIndex tile, bool water)
|
|||||||
} else if (TileX(tile) < TileX(t)) {
|
} else if (TileX(tile) < TileX(t)) {
|
||||||
/* We can safely skip this many tiles; up to here all tiles have a
|
/* We can safely skip this many tiles; up to here all tiles have a
|
||||||
* higher or equal distance than the best distance */
|
* higher or equal distance than the best distance */
|
||||||
t += max(best_dist - dist, 0);
|
t += dist - best_dist;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user