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
Fix #8037: assertion failed when reloading AI for last existing company in offline mode #8587
Conversation
src/ai/ai_gui.cpp
Outdated
@@ -14,6 +14,7 @@ | |||
#include "../querystring_gui.h" | |||
#include "../stringfilter_type.h" | |||
#include "../company_base.h" | |||
#include "../company_func.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could be extern _local_company instead of an #include ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah should work too.
ec16e6e
to
38afa48
Compare
The mention of
In commits, Not sure what we should call non-multiplayer, but for sure we use different names for it currently :) Maybe good to tackle that for this PR already? |
Fixes #8037
Motivation / Problem
Reloading AI means deleting and recreating a company.
This is not possible if it's the last existing company in offline mode, as it's the only company in which player can be.
Description
First commit prevents deletion of last existing company.
Second commit prevents the reloading of AI for local company, in the same way
stop_ai
does it.Limitations
Checklist for review
Some things are not automated, and forgotten often. This list is a reminder for the reviewers.