From f055f15ae7ef67069d51251b43c8bda22622018d Mon Sep 17 00:00:00 2001 From: Magnus Auvinen Date: Sat, 6 Oct 2007 17:36:24 +0000 Subject: added warmup --- src/game/client/game_client.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/game/client') 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) -- cgit 1.4.1