landscape.cpp fixes

pull/272/head
Andreas Schmitt 3 years ago committed by Jonathan G Rennison
parent 44fe1ca00b
commit 7601720ff7

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

Loading…
Cancel
Save