Fix #7604: prevent houses to wander too far from town center when rebuilding #8507
Motivation / Problem
As described in #7604, a bug that existed since TTO. It is a funny little bug, and depending on how lucky you are, houses could wander off endlessly. This simple approach resolve the wandering around.
When a multi-tile house is rebuild, it always used the most northern
To prevent this, pick the tile closest to town center when rebuilding
If you want to see for yourself that this works, best to use the following savegame:
It is somewhat prepared to show the worst of this all ;) Just load it in, unpause, fast forward, and once in a while send some funds to the town. If you want to test this faster, change line 624 to:
And line 629 to:
Now you have some speedy rebuilds on your hands!
Checklist for review
Some things are not automated, and forgotten often. This list is a reminder for the reviewers.
…uilding When a multi-tile house is rebuild, it always used the most northern tile to build the new house. This can very easily lead to houses wandering off in the north-ish direction (either NW or NE). To prevent this, pick the tile closest to town center when rebuilding on a multi-tile house. This still means a house can be build away from a road, but it is no longer wandering around finding another town to call home.