summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-11-06 12:39:47 +0100
committerErich Eckner <git@eckner.net>2018-11-16 19:11:47 +0100
commit0f0a351718807817c0638a128a7e886087d5ec1b (patch)
tree6b3a2d0430ce9b18e42e7bc1194d4e89cc9a97bc
parentb2e3088d08c03d3950e648623185d73b715399d8 (diff)
downloadopenttd-0f0a351718807817c0638a128a7e886087d5ec1b.tar.xz
UNDERGROUND_COST_MULTIPLIER should increase for descending layers
-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 4cdeeb8c8..5f97e1625 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) (IsUnderground(tile) ? 100 * (1 + (TileHeight(TopTile(tile))-TileHeight(tile))*(TileHeight(TopTile(tile))-TileHeight(tile))) : 1)
+#define UNDERGROUND_COST_MULTIPLIER(tile) (1 + 100 * LayerIndex(tile) * (1 + (TileHeight(TopTile(tile))-TileHeight(tile))*(TileHeight(TopTile(tile))-TileHeight(tile))))
#define FOR_ALL_LAYERS(var) for (uint var = 0; var < LayerCount(); var++)