(svn r16559) -Codechange: introduce Company::IsValidAiID() and Company::IsValidHumanID(), don't use IsHumanCompany() where possible

This commit is contained in:
smatz
2009-06-10 22:05:01 +00:00
parent 0b66eb938f
commit a2567c84a0
14 changed files with 47 additions and 38 deletions

View File

@@ -1592,7 +1592,7 @@ struct CompanyWindow : Window
this->SetWidgetHiddenState(CW_WIDGET_SELL_SHARE, local);
this->SetWidgetHiddenState(CW_WIDGET_COMPANY_PASSWORD, !local || !_networking);
this->SetWidgetHiddenState(CW_WIDGET_COMPANY_JOIN, local || !_networking);
this->SetWidgetDisabledState(CW_WIDGET_COMPANY_JOIN, !IsHumanCompany(c->index));
this->SetWidgetDisabledState(CW_WIDGET_COMPANY_JOIN, c->is_ai);
if (!local) {
if (_settings_game.economy.allow_shares) { // Shares are allowed