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

Bankruptcy owner issues #4529

Closed
DorpsGek opened this issue Feb 22, 2011 · 2 comments
Closed

Bankruptcy owner issues #4529

DorpsGek opened this issue Feb 22, 2011 · 2 comments
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

Terkhen opened the ticket and wrote:

When a company bankrupts in multiplayer and it has road stops the client in that company will assert (see attached stacktrace.txt and crash.*). The bankruptcy works fine in the server.

If the bankrupt company has only rail stations or railways, in the client they will get "someone" as owner instead of being deleted (again, they are correctly deleted in the server). See attached rail_station.sav.

While debugging the first assertion it seems that when removing company property _current_company is set to COMPANY_SPECTATOR, which results in failed CheckOwnership tests for road stops and as a result, the road stops are not removed.

Attachments

Reported version: 1.1.0-RC1
Operating system: All


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

Rubidium wrote:

I guess it has to do with NetworkClientsToSpectators calling SetLocalCompany, which... to not much surprise sets _current_company to COMPANY_SPECTATOR. So adding _current_company = old_owner (or something similar) after the call to NetworkClientsToSpectators might very well do the trick.

I'm not quite sure whether that might have repurcussions somewhere else though.


This comment was imported from FlySpray: https://bugs.openttd.org/task/4529#comment9733

@DorpsGek
Copy link
Member Author

Terkhen closed the ticket.

Reason for closing: Fixed

In r22154.


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

@DorpsGek DorpsGek added Core flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) labels Apr 7, 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