about summary refs log tree commit diff
path: root/src/game/client
diff options
context:
space:
mode:
authorMagnus Auvinen <magnus.auvinen@gmail.com>2007-10-06 17:36:24 +0000
committerMagnus Auvinen <magnus.auvinen@gmail.com>2007-10-06 17:36:24 +0000
commitf055f15ae7ef67069d51251b43c8bda22622018d (patch)
tree0320c5f0aada1626be291cf6b3e3d5227a1bd405 /src/game/client
parentee105f1cfd701fa411319d6f14c28c7d675afe7a (diff)
downloadzcatch-f055f15ae7ef67069d51251b43c8bda22622018d.tar.gz
zcatch-f055f15ae7ef67069d51251b43c8bda22622018d.zip
added warmup
Diffstat (limited to 'src/game/client')
-rw-r--r--src/game/client/game_client.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/game/client/game_client.cpp b/src/game/client/game_client.cpp
index f6fd9dd2..a6eac2e7 100644
--- a/src/game/client/game_client.cpp
+++ b/src/game/client/game_client.cpp
@@ -2189,6 +2189,22 @@ void render_game()
 				gfx_pretty_text(320+t*35+30/2-w/2, 300-15, 14, buf, -1);
 			}
 		}
+		
+		// render warmup timer
+		if(gameobj->warmup)
+		{
+			char buf[256];
+			float w = gfx_pretty_text_width(24, "Warmup", -1);
+			gfx_pretty_text(200+-w/2, 50, 24, "Warmup", -1);
+			
+			int seconds = gameobj->warmup/SERVER_TICK_SPEED;
+			if(seconds < 5)
+				sprintf(buf, "%d.%d", seconds, (gameobj->warmup*10/SERVER_TICK_SPEED)%10);
+			else
+				sprintf(buf, "%d", seconds);
+			w = gfx_pretty_text_width(24, buf, -1);
+			gfx_pretty_text(200+-w/2, 75, 24, buf, -1);
+		}
 	}
 
 	if (menu_active)