(svn r1187) -Fix: [Network] You can no longer join as spectator a game with no
authortruelight
Mon, 20 Dec 2004 16:15:19 +0000
changeset 735 995f97df3bd7
parent 734 f4ad2f5805fd
child 736 75bcef85daeb
(svn r1187) -Fix: [Network] You can no longer join as spectator a game with no
companies (a lot of code can simply not handle it)
network_gui.c
--- a/network_gui.c	Mon Dec 20 16:02:01 2004 +0000
+++ b/network_gui.c	Mon Dec 20 16:15:19 2004 +0000
@@ -643,6 +643,10 @@
 
 		if (_network_lobby_company_count == MAX_PLAYERS)
 			w->disabled_state |= (1<<8);
+		/* You can not join a server as spectator when it has no companies active..
+		     it causes some nasty crashes */
+		if (_network_lobby_company_count == 0)
+			w->disabled_state |= (1<<9);
 
 		DrawWindowWidgets(w);