Skip to content

Commit

Permalink
Merge pull request #4746 from tatoyoda600/develop
Browse files Browse the repository at this point in the history
Fix reindex_pathfinding
  • Loading branch information
myk002 authored Jun 24, 2024
2 parents add31d0 + 8ed2e5c commit 7d64030
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions plugins/tiletypes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1059,6 +1059,9 @@ static PaintResult paintArea(MapExtras::MapCache& map, const df::coord& pos1, co
Maps::removeAreaAquifer(pos1, pos2, filter);
else if (target.aquifer > 0)
Maps::setAreaAquifer(pos1, pos2, target.aquifer == 2, filter);

// force the game to recompute its walkability cache on the next tick
world->reindex_pathfinding = true;
}
}
};
Expand Down Expand Up @@ -1102,11 +1105,11 @@ static PaintResult paintTile(MapExtras::MapCache &map, const df::coord &pos,
Maps::removeTileAquifer(pos);
else if (target.aquifer > 0)
Maps::setTileAquifer(pos, target.aquifer == 2);

// force the game to recompute its walkability cache on the next tick
world->reindex_pathfinding = true;
}
};

// force the game to recompute its walkability cache on the next tick
world->reindex_pathfinding = true;
}
return PaintResult();
}
Expand Down

0 comments on commit 7d64030

Please sign in to comment.