(svn r3414) - Fix: Disable the Fund New Industry menu item and window when connected to a server as a spectator.
--- a/industry_gui.c Sat Jan 21 20:34:17 2006 +0000
+++ b/industry_gui.c Sat Jan 21 21:45:34 2006 +0000
@@ -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 Sat Jan 21 20:34:17 2006 +0000
+++ b/main_gui.c Sat Jan 21 21:45:34 2006 +0000
@@ -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)