about summary refs log tree commit diff
path: root/src/game/client/gc_menu.cpp
diff options
context:
space:
mode:
authorMagnus Auvinen <magnus.auvinen@gmail.com>2007-12-16 21:54:36 +0000
committerMagnus Auvinen <magnus.auvinen@gmail.com>2007-12-16 21:54:36 +0000
commit69dfe6878f13c36489d7d671b6d2284055b0990f (patch)
tree62e622019a4de7b2672fa0316b90267bcf12dd6a /src/game/client/gc_menu.cpp
parent00adf08412cc08733bb289babdc62a1ea95d42d0 (diff)
downloadzcatch-69dfe6878f13c36489d7d671b6d2284055b0990f.tar.gz
zcatch-69dfe6878f13c36489d7d671b6d2284055b0990f.zip
fixed rendering of spectators
Diffstat (limited to 'src/game/client/gc_menu.cpp')
-rw-r--r--src/game/client/gc_menu.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/game/client/gc_menu.cpp b/src/game/client/gc_menu.cpp
index e25342dd..915b40c7 100644
--- a/src/game/client/gc_menu.cpp
+++ b/src/game/client/gc_menu.cpp
@@ -1638,7 +1638,21 @@ static void menu2_render_game(RECT main_view)
 			}
 		}
 		
-		if(gameobj->gametype != GAMETYPE_DM)
+		if(gameobj->gametype == GAMETYPE_DM)
+		{
+			if(local_info->team != 0)
+			{
+				ui2_vsplit_l(&main_view, 10.0f, &button, &main_view);
+				ui2_vsplit_l(&main_view, 120.0f, &button, &main_view);
+				static int spectate_button = 0;
+				if(ui2_do_button(&spectate_button, "Join Game", 0, &button, ui2_draw_menu_button, 0))
+				{
+					config.cl_team = 0;
+					menu_active = false;
+				}
+			}						
+		}
+		else
 		{
 			if(local_info->team != 0)
 			{