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
Put into the AI company when loading savegame #6544
Comments
Happens vice versa. Steps:
Possible solution: In single player, you should start in the first human player company (company id 2) that is in the save game, or the game should automatically create a new human company if there is none in the savegame. |
Thanks for this. There's been no activity on this for some time, and as it stands, it doesn't look likely that it will go any further. I'm closing it as we try to keep the issue count low for OpenTTD, it helps us focus on things that are important and fun. Feel free to discuss in irc or request re-opening if you disagree. Thanks for contributing! |
I created master...SamuXarick:start/load-network-games-as-spectator and despite what the branch name implies, the following are the actual changes as suggested by @James103 :
Making it work for single player was easy. I just created a function called For multiplayer, there is a problem. There is a third variable, the network client ID of the server. The client id, as of current openttd master, is initialized before any game load has happened. It tries to set the local company before I can use I'm unsure if this was the right approach, I don't know of the importance of the client id of the server existing before any generation/loading is done. Is that going to break server listing? Need someone with more experience to take a look at this. |
Is this fixed by #9467, which makes everyone a spectator upon joining a network game? Of course, it doesn't solve the scenario described by @James103 and with a proposed fix by @SamuXarick, but I think it clears up the questions about client IDs in network games. |
The network game side is probably fixed yes. Single player still go in first company. |
Samu opened the ticket and wrote:
Attachments
Reported version: Version?
Operating system: All
This issue was imported from FlySpray: https://bugs.openttd.org/task/6544
The text was updated successfully, but these errors were encountered: