diff options
| author | Magnus Auvinen <magnus.auvinen@gmail.com> | 2008-03-09 18:20:27 +0000 |
|---|---|---|
| committer | Magnus Auvinen <magnus.auvinen@gmail.com> | 2008-03-09 18:20:27 +0000 |
| commit | 61535a565a62d74654140af97ddd1cc853a54197 (patch) | |
| tree | 0fd90a9f82c9546f9b5d38b0753a534c597caf3c /src/game/client/gc_client.cpp | |
| parent | f10958c450a20c99603ca785365ebaeca9a23f72 (diff) | |
| download | zcatch-61535a565a62d74654140af97ddd1cc853a54197.tar.gz zcatch-61535a565a62d74654140af97ddd1cc853a54197.zip | |
added cl_showfps. removed cl_show_player_ids
Diffstat (limited to 'src/game/client/gc_client.cpp')
| -rw-r--r-- | src/game/client/gc_client.cpp | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/src/game/client/gc_client.cpp b/src/game/client/gc_client.cpp index b3ad79f3..fec01294 100644 --- a/src/game/client/gc_client.cpp +++ b/src/game/client/gc_client.cpp @@ -667,13 +667,7 @@ void render_scoreboard(float x, float y, float w, int team, const char *title) str_format(buf, sizeof(buf), "%4d", info->score); gfx_text(0, x+60-gfx_text_width(0, font_size,buf,-1), y, font_size, buf, -1); - if(config.cl_show_player_ids) - { - str_format(buf, sizeof(buf), "%d | %s", info->cid, client_datas[info->cid].name); - gfx_text(0, x+128, y, font_size, buf, -1); - } - else - gfx_text(0, x+128, y, font_size, client_datas[info->cid].name, -1); + gfx_text(0, x+128, y, font_size, client_datas[info->cid].name, -1); str_format(buf, sizeof(buf), "%4d", info->latency); float tw = gfx_text_width(0, font_size, buf, -1); @@ -1360,6 +1354,19 @@ void render_game() } // render debug stuff + + { + float w = 300*gfx_screenaspect(); + gfx_mapscreen(0, 0, w, 300); + + char buf[512]; + if(config.cl_showfps) + { + str_format(buf, sizeof(buf), "%d", (int)(1.0f/client_frametime())); + gfx_text(0, w-10-gfx_text_width(0,12,buf,-1), 10, 12, buf, -1); + } + } + if(config.debug && netobjects.local_character && netobjects.local_prev_character) { gfx_mapscreen(0, 0, 300*gfx_screenaspect(), 300); |