summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-11-16 19:21:44 +0100
committerErich Eckner <git@eckner.net>2022-01-16 21:58:17 +0100
commita2b94fd5b8884f22053e9c9956a5c60792021fb6 (patch)
tree026c21a4a791c0f9e4958b0f7c334402d18abda9
parent99acaad1c3a865ee5e8da21225186a6fc0de4e6a (diff)
downloadopenttd-a2b94fd5b8884f22053e9c9956a5c60792021fb6.tar.xz
src/layer_func.h: UNDERGROUND_COST_MULTIPLIER improved
-rw-r--r--src/layer_func.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/layer_func.h b/src/layer_func.h
index 5f97e1625..be060cc27 100644
--- a/src/layer_func.h
+++ b/src/layer_func.h
@@ -24,7 +24,7 @@ void InstallLayerSystem(uint size_x, uint size_y, uint layer_count);
* (в будущем слои могут менять высоты -- в пределах соседей) */
void FixUndergroundHeights();
-#define UNDERGROUND_COST_MULTIPLIER(tile) (1 + 100 * LayerIndex(tile) * (1 + (TileHeight(TopTile(tile))-TileHeight(tile))*(TileHeight(TopTile(tile))-TileHeight(tile))))
+#define UNDERGROUND_COST_MULTIPLIER(tile) (1 + 100 * (TileHeight(TopTile(tile))-TileHeight(tile)-LayerIndex(tile)))
#define FOR_ALL_LAYERS(var) for (uint var = 0; var < LayerCount(); var++)