Skip to content
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]: Ships can exit depots and locks through the sides if the exit is a dead end #9669

Closed
JGRennison opened this issue Nov 4, 2021 · 0 comments

Comments

@JGRennison
Copy link
Contributor

Version of OpenTTD

Since #9610

Expected result

Ships can only exit depots and locks via the two exits in the axial directions.

Actual result

When a ship is exiting a depot or lock and the next tile is impassable the ship will attempt to reverse using all other of the trackdirs reachable from the opposite DiagDirection, even in the case where the GetTileTrackStatus of the tile does not include those trackdirs. For locks and depots GetTileTrackStatus only includes the axial trackdirs.

This can alternatively result in a ship becoming trapped in a non-axial direction on the exit tile even when the other exit is available.

(This issue managed to trigger the CFollowTrackT::Follow assertion for one particular savegame when loaded in my branch, but I can't seem to reproduce this anywhere else. At a glance the assertion looks like it ought to get triggered here as well.
If I can reproduce this I will update the issue.)

Steps to reproduce

Ship reverse testing, 1990-03-31.sav.zip

See ships 1 and 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant