mirror of https://github.com/OpenTTD/OpenTTD
(svn r3414) - Fix: Disable the Fund New Industry menu item and window when connected to a server as a spectator.
parent
d22e8c636d
commit
d13763a9c4
|
@ -267,6 +267,7 @@ static const WindowDesc * const _industry_window_desc[2][4] = {
|
||||||
|
|
||||||
void ShowBuildIndustryWindow(void)
|
void ShowBuildIndustryWindow(void)
|
||||||
{
|
{
|
||||||
|
if (_current_player == OWNER_SPECTATOR) return;
|
||||||
AllocateWindowDescFront(_industry_window_desc[_patches.build_rawmaterial_ind][_opt_ptr->landscape],0);
|
AllocateWindowDescFront(_industry_window_desc[_patches.build_rawmaterial_ind][_opt_ptr->landscape],0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -791,7 +791,8 @@ static void ToolbarLeagueClick(Window *w)
|
||||||
|
|
||||||
static void ToolbarIndustryClick(Window *w)
|
static void ToolbarIndustryClick(Window *w)
|
||||||
{
|
{
|
||||||
PopupMainToolbMenu(w, 280, 12, STR_INDUSTRY_DIR, 2, 0);
|
int dis = _current_player == OWNER_SPECTATOR ? 2 : 0;
|
||||||
|
PopupMainToolbMenu(w, 280, 12, STR_INDUSTRY_DIR, 2, dis);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ToolbarTrainClick(Window *w)
|
static void ToolbarTrainClick(Window *w)
|
||||||
|
|
Loading…
Reference in New Issue