about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMagnus Auvinen <magnus.auvinen@gmail.com>2007-10-03 22:09:48 +0000
committerMagnus Auvinen <magnus.auvinen@gmail.com>2007-10-03 22:09:48 +0000
commitfe623f4003212ae2fd6d902dfaf611f2e13e18f0 (patch)
treec31da3192b4cdb6330694423cbae47029b058ad0
parenta67738e9801a4485cfaf68012279cd5042dc2ab9 (diff)
downloadzcatch-fe623f4003212ae2fd6d902dfaf611f2e13e18f0.tar.gz
zcatch-fe623f4003212ae2fd6d902dfaf611f2e13e18f0.zip
fixed score display thats always visible
-rw-r--r--src/game/client/game_client.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/game/client/game_client.cpp b/src/game/client/game_client.cpp
index 8a2c5523..2c9307eb 100644
--- a/src/game/client/game_client.cpp
+++ b/src/game/client/game_client.cpp
@@ -2126,6 +2126,27 @@ void render_game()
 			float w = gfx_pretty_text_width(16, text, -1);
 			gfx_pretty_text(200-w/2, 2, 16, text, -1);
 		}
+		
+		if(gametype == GAMETYPE_TDM || gametype == GAMETYPE_CTF)
+		{
+			for(int t = 0; t < 2; t++)
+			{
+				gfx_blend_normal();
+				gfx_texture_set(-1);
+				gfx_quads_begin();
+				if(t == 0)
+					gfx_setcolor(1,0,0,0.5f);
+				else
+					gfx_setcolor(0,0,1,0.5f);
+				draw_round_rect(320+t*35, 300-15, 30, 50, 5.0f);
+				gfx_quads_end();
+				
+				char buf[32];
+				sprintf(buf, "%d", gameobj->teamscore[t]);
+				float w = gfx_pretty_text_width(14, buf, -1);
+				gfx_pretty_text(320+t*35+30/2-w/2, 300-15, 14, buf, -1);
+			}
+		}
 	}
 
 	if (menu_active)