From 0f0a351718807817c0638a128a7e886087d5ec1b Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Tue, 6 Nov 2018 12:39:47 +0100 Subject: UNDERGROUND_COST_MULTIPLIER should increase for descending layers --- src/layer_func.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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++) -- cgit v1.2.3-70-g09d2