diff options
author | glx22 <glx@openttd.org> | 2021-01-18 15:33:39 +0100 |
---|---|---|
committer | Loïc Guilloux <glx22@users.noreply.github.com> | 2021-01-22 22:19:55 +0100 |
commit | 07385c36623ede05fbc4ac49076e1a26e349d731 (patch) | |
tree | 995e5b3f759315cf56a6cd90e8ac92efc56dbfef /src/ai | |
parent | 485aafc1b7d51967e06cc5db76c195edcf8dc644 (diff) | |
download | openttd-07385c36623ede05fbc4ac49076e1a26e349d731.tar.xz |
Fix: Use the same safety checks as 'stop_ai' for 'reload_ai'
Diffstat (limited to 'src/ai')
-rw-r--r-- | src/ai/ai_gui.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ai/ai_gui.cpp b/src/ai/ai_gui.cpp index 30edc9940..8db22e41b 100644 --- a/src/ai/ai_gui.cpp +++ b/src/ai/ai_gui.cpp @@ -1406,7 +1406,8 @@ struct AIDebugWindow : public Window { this->SetWidgetLoweredState(WID_AID_MATCH_CASE_BTN, this->case_sensitive_break_check); this->SetWidgetDisabledState(WID_AID_SETTINGS, ai_debug_company == INVALID_COMPANY); - this->SetWidgetDisabledState(WID_AID_RELOAD_TOGGLE, ai_debug_company == INVALID_COMPANY || ai_debug_company == OWNER_DEITY); + extern CompanyID _local_company; + this->SetWidgetDisabledState(WID_AID_RELOAD_TOGGLE, ai_debug_company == INVALID_COMPANY || ai_debug_company == OWNER_DEITY || ai_debug_company == _local_company); this->SetWidgetDisabledState(WID_AID_CONTINUE_BTN, ai_debug_company == INVALID_COMPANY || (ai_debug_company == OWNER_DEITY ? !Game::IsPaused() : !AI::IsPaused(ai_debug_company))); } |