Skip to content

Commit 7d64030

Browse files
authored
Merge pull request #4746 from tatoyoda600/develop
Fix reindex_pathfinding
2 parents add31d0 + 8ed2e5c commit 7d64030

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

plugins/tiletypes.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1059,6 +1059,9 @@ static PaintResult paintArea(MapExtras::MapCache& map, const df::coord& pos1, co
10591059
Maps::removeAreaAquifer(pos1, pos2, filter);
10601060
else if (target.aquifer > 0)
10611061
Maps::setAreaAquifer(pos1, pos2, target.aquifer == 2, filter);
1062+
1063+
// force the game to recompute its walkability cache on the next tick
1064+
world->reindex_pathfinding = true;
10621065
}
10631066
}
10641067
};
@@ -1102,11 +1105,11 @@ static PaintResult paintTile(MapExtras::MapCache &map, const df::coord &pos,
11021105
Maps::removeTileAquifer(pos);
11031106
else if (target.aquifer > 0)
11041107
Maps::setTileAquifer(pos, target.aquifer == 2);
1108+
1109+
// force the game to recompute its walkability cache on the next tick
1110+
world->reindex_pathfinding = true;
11051111
}
11061112
};
1107-
1108-
// force the game to recompute its walkability cache on the next tick
1109-
world->reindex_pathfinding = true;
11101113
}
11111114
return PaintResult();
11121115
}

0 commit comments

Comments
 (0)