diff options
Diffstat (limited to 'src/player_gui.cpp')
-rw-r--r-- | src/player_gui.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/player_gui.cpp b/src/player_gui.cpp index 006e7244d..8b1c24ab3 100644 --- a/src/player_gui.cpp +++ b/src/player_gui.cpp @@ -1185,10 +1185,10 @@ struct PlayerCompanyWindow : Window this->SetWidgetHiddenState(PCW_WIDGET_COLOR_SCHEME, !local); this->SetWidgetHiddenState(PCW_WIDGET_PRESIDENT_NAME, !local); this->SetWidgetHiddenState(PCW_WIDGET_COMPANY_NAME, !local); - this->widget[PCW_WIDGET_BUILD_VIEW_HQ].data = (local && p->location_of_house == 0) ? STR_706F_BUILD_HQ : STR_7072_VIEW_HQ; - if (local && p->location_of_house != 0) this->widget[PCW_WIDGET_BUILD_VIEW_HQ].type = WWT_PUSHTXTBTN; //HQ is already built. - this->SetWidgetDisabledState(PCW_WIDGET_BUILD_VIEW_HQ, !local && p->location_of_house == 0); - this->SetWidgetHiddenState(PCW_WIDGET_RELOCATE_HQ, !local || p->location_of_house == 0); + this->widget[PCW_WIDGET_BUILD_VIEW_HQ].data = (local && p->location_of_HQ == 0) ? STR_706F_BUILD_HQ : STR_7072_VIEW_HQ; + if (local && p->location_of_HQ != 0) this->widget[PCW_WIDGET_BUILD_VIEW_HQ].type = WWT_PUSHTXTBTN; //HQ is already built. + this->SetWidgetDisabledState(PCW_WIDGET_BUILD_VIEW_HQ, !local && p->location_of_HQ == 0); + this->SetWidgetHiddenState(PCW_WIDGET_RELOCATE_HQ, !local || p->location_of_HQ == 0); this->SetWidgetHiddenState(PCW_WIDGET_BUY_SHARE, local); this->SetWidgetHiddenState(PCW_WIDGET_SELL_SHARE, local); this->SetWidgetHiddenState(PCW_WIDGET_COMPANY_PASSWORD, !local || !_networking); @@ -1267,7 +1267,7 @@ struct PlayerCompanyWindow : Window break; case PCW_WIDGET_BUILD_VIEW_HQ: { - TileIndex tile = GetPlayer((PlayerID)this->window_number)->location_of_house; + TileIndex tile = GetPlayer((PlayerID)this->window_number)->location_of_HQ; if (tile == 0) { if ((byte)this->window_number != _local_player) return; SetObjectToPlaceWnd(SPR_CURSOR_HQ, PAL_NONE, VHM_RECT, this); |