Mercurial > hg > openttd
changeset 2866:b6b4ece03b10 draft
(svn r3414) - Fix: Disable the Fund New Industry menu item and window when connected to a server as a spectator.
author | peter1138 <peter1138@openttd.org> |
---|---|
date | Sat, 21 Jan 2006 21:45:34 +0000 |
parents | 291234616e6b |
children | db43cbd6755b |
files | industry_gui.c main_gui.c |
diffstat | 2 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/industry_gui.c +++ b/industry_gui.c @@ -267,6 +267,7 @@ void ShowBuildIndustryWindow(void) { + if (_current_player == OWNER_SPECTATOR) return; AllocateWindowDescFront(_industry_window_desc[_patches.build_rawmaterial_ind][_opt_ptr->landscape],0); }
--- a/main_gui.c +++ b/main_gui.c @@ -791,7 +791,8 @@ 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)