landscape.cpp fixes

This commit is contained in:
Andreas Schmitt
2021-06-15 14:45:46 +02:00
committed by Jonathan G Rennison
parent 44fe1ca00b
commit 7601720ff7

View File

@@ -1209,8 +1209,7 @@ static bool RiverMakeWider(TileIndex tile, void *data)
/* AyStar callback when an route has been found. */ /* AyStar callback when an route has been found. */
static void River_FoundEndNode(AyStar *aystar, OpenListNode *current) static void River_FoundEndNode(AyStar *aystar, OpenListNode *current)
{ {
uint cur_pos = 0; for (PathNode *path = &current->path; path != nullptr; path = path->parent) {
for (PathNode *path = &current->path; path != nullptr; path = path->parent, cur_pos++) {
TileIndex tile = path->node.tile; TileIndex tile = path->node.tile;
if (!IsWaterTile(tile)) { if (!IsWaterTile(tile)) {
MakeRiver(tile, Random()); MakeRiver(tile, Random());