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

block for oilfields ( and other airports not removed by autoclean) not removed #2241

Closed
DorpsGek opened this issue Aug 20, 2008 · 6 comments
Closed
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

yorick opened the ticket and wrote:

When autoclean happens while a plane is loading on an oilrig(or other airport for that matter), the waiting planes keep waiting, and don't land.

First save is test setup, reset company 2 > second save

Please fix this bug for other types of airport too, as it causes a deadlock quite often.

Attachments

Reported version: trunk
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/2241
@DorpsGek
Copy link
Member Author

kakaopor wrote:

It looks like the oilrig's airport_flags was not reset when it was being used by an aircraft of the autocleaned user.

Here is a patch what fixes this problem in autoclean, and after a load too (so the stucked saved games should be ok now).

As far as i know it's working well, but please test it and leave a comment.

(for r14286)

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/2241#comment4729

@DorpsGek
Copy link
Member Author

yorick wrote:

This patch removes all blocks on the airport if there is just one aircraft that's being autocleaned on it.


This comment was imported from FlySpray: https://bugs.openttd.org/task/2241#comment4730

@DorpsGek
Copy link
Member Author

kakaopor wrote:

Yes, it removes.

Is there any nobody owned factory with more than one airport? (I haven't seen any so i thought it'll be ok.)


This comment was imported from FlySpray: https://bugs.openttd.org/task/2241#comment4731

@DorpsGek
Copy link
Member Author

yorick wrote:

Here is a test save, simply reset company 2 and you'll see the blue plane keeps circling.

If you add some more blue planes which are actually on the airport, if you reset company 2 then, it will remove all blocks instead of the one used by the just cleaned plane

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/2241#comment4732

@DorpsGek
Copy link
Member Author

kakaopor wrote:

This patch cleans up the blocks of aircrafts when DeleteVehicleChain() called.

This can fix the bug only when autocleaning, it cannot "repair" a saved game.

Note: the patch clears the current and the previous blocks of the vehicle (see AirportGoToNextPosition, and AirportClearBlock about handling current and prev. blocks), and because there is not recorded who set the block, theorically deleting the block set by the next vehicle can happen. I think this is a very rare case (i was unable to create such situation), and can only affect graphics, the planes won't crash, and the next block will be successfully set.

Please test it, and leave comments.

Update: the patch can be applied against r14293 too.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/2241#comment4733

@DorpsGek
Copy link
Member Author

Rubidium closed the ticket.

Reason for closing: Fixed

In r14324.


This comment was imported from FlySpray: https://bugs.openttd.org/task/2241

@DorpsGek DorpsGek added Core flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) labels Apr 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)
Projects
None yet
Development

No branches or pull requests

1 participant