about summary refs log tree commit diff
path: root/src/game/client/game_client.cpp
diff options
context:
space:
mode:
authorMagnus Auvinen <magnus.auvinen@gmail.com>2007-10-03 21:32:02 +0000
committerMagnus Auvinen <magnus.auvinen@gmail.com>2007-10-03 21:32:02 +0000
commita67738e9801a4485cfaf68012279cd5042dc2ab9 (patch)
tree5a4fa1db378b9b889b73b66ff9ac974fdc141dca /src/game/client/game_client.cpp
parent30a7246f2fd5e2141de2c37f01b491abe374f3f9 (diff)
downloadzcatch-a67738e9801a4485cfaf68012279cd5042dc2ab9.tar.gz
zcatch-a67738e9801a4485cfaf68012279cd5042dc2ab9.zip
general fixes. fixed scoreboard
Diffstat (limited to 'src/game/client/game_client.cpp')
-rw-r--r--src/game/client/game_client.cpp25
1 files changed, 23 insertions, 2 deletions
diff --git a/src/game/client/game_client.cpp b/src/game/client/game_client.cpp
index 3288fa65..8a2c5523 100644
--- a/src/game/client/game_client.cpp
+++ b/src/game/client/game_client.cpp
@@ -1562,10 +1562,31 @@ void render_scoreboard(obj_game *gameobj, float x, float y, float w, int team, c
 	}
 
 	float tw = gfx_pretty_text_width( 64, title, -1);
-	gfx_pretty_text(x+w/2-tw/2, y, 64, title, -1);
-	
 
+	if(team == -1)
+	{
+		gfx_pretty_text(x+w/2-tw/2, y, 64, title, -1);
+	}
+	else
+	{
+		gfx_pretty_text(x+10, y, 64, title, -1);
+		
+		char buf[128];
+		sprintf(buf, "%d", gameobj->teamscore[team&1]);
+		tw = gfx_pretty_text_width(64, buf, -1);
+		gfx_pretty_text(x+w-tw-40, y, 64, buf, -1);
+	}
+	
 	y += 64.0f;
+	
+	/*
+	if(team)
+	{
+		char buf[128];
+		sprintf(buf, "%4d", gameobj->teamscore[team&1]);
+		gfx_pretty_text(x+w/2-tw/2, y, 32, buf, -1);
+	}*/
+
 
 	// find players
 	const obj_player *players[MAX_CLIENTS] = {0};