New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Ship becomes lost after moving buoy #12301
Comments
Just a note on the issue reporting - issues should describe the problem as it appears to the user, rather than where you think the issue is in the code. To do otherwise risks making a solution to the wrong problem, or finding a solution to a non-existent problem It's perfectly fine for the extended description to describe what you think, but the bug report itself must be about the problem, not the solution. (unless an issue is entirely "this code needs cleanup/refactoring/whatever", of course) |
Moving buoys caused current_order to be detected as unchanged, making pathfinders to compute a path to an outdated v->dest_tile. Properly update v->dest_tile before reaching pathfinders.
Moving buoys caused current_order to be detected as unchanged, making pathfinders to compute a path to an outdated v->dest_tile. Properly update v->dest_tile before reaching pathfinders.
…locating buoys Moving buoys caused current_order to be detected as unchanged, making pathfinders to compute a path to an outdated v->dest_tile. Properly update v->dest_tile before reaching pathfinders. ok
…locating buoys Moving buoys caused current_order to be detected as unchanged, making pathfinders to compute a path to an outdated v->dest_tile. Properly update v->dest_tile before reaching pathfinders.
…locating buoys Moving buoys caused current_order to be detected as unchanged, making pathfinders to compute a path to an outdated v->dest_tile. Properly update v->dest_tile before reaching pathfinders.
Version of OpenTTD
Openttd 20240315-master-ga7625b8ae0
Expected result
Either
v->dest_tile
is updated upon relocation, or some other more elaborate method needs to be used to reflect the actual location of the buoy.Actual result
This bug is deeper and has nothing to do with the pathfinder. It's about buoy location. The buoy is removed and moved to another tile, this doesn't update the
v->dest_tile
of vehicles.What happened:
The previous location of the buoy was valid, but then demolished, and rebuilt to a near location, reusing the same
WaypointID
value, but with a different location. The old place was then raised terrain and became waterless.The pathfinder is given the old location, and the high lvl pathfinder finds a patch with no water, hence the label 0.
Low level pathfinder doesn't even get the chance, it fails right away in high level pathfinder with a size of 0
would probably be given the same erroneous location, since it's also
m_destTile = v->dest_tile;
Steps to reproduce
Ship is lost!
ship 2 is lost because buoy was relocated.zip
The text was updated successfully, but these errors were encountered: