diff options
| author | Magnus Auvinen <magnus.auvinen@gmail.com> | 2007-12-16 13:12:03 +0000 |
|---|---|---|
| committer | Magnus Auvinen <magnus.auvinen@gmail.com> | 2007-12-16 13:12:03 +0000 |
| commit | 6285917917537b51c9dedcad1780a7f9b1193174 (patch) | |
| tree | 979f0080dc31225ca71249fd24a509c53e91421d /src/game/client/gc_client.cpp | |
| parent | d83b83a7e5cab22796e84c55507efee19121093b (diff) | |
| download | zcatch-6285917917537b51c9dedcad1780a7f9b1193174.tar.gz zcatch-6285917917537b51c9dedcad1780a7f9b1193174.zip | |
added some extra checks
Diffstat (limited to 'src/game/client/gc_client.cpp')
| -rw-r--r-- | src/game/client/gc_client.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/game/client/gc_client.cpp b/src/game/client/gc_client.cpp index 159c2067..c1f71f59 100644 --- a/src/game/client/gc_client.cpp +++ b/src/game/client/gc_client.cpp @@ -2874,7 +2874,19 @@ void render_game() gfx_mapscreen(0, 0, 300*gfx_screenaspect(), 300); const char *text = "Connection Problems..."; float w = gfx_pretty_text_width(24, text, -1); - gfx_pretty_text(200*gfx_screenaspect()-w/2, 50, 24, text, -1); + gfx_pretty_text(150*gfx_screenaspect()-w/2, 50, 24, text, -1); + } + + if(config.debug && local_character && local_prev_character) + { + gfx_mapscreen(0, 0, 300*gfx_screenaspect(), 300); + + float speed = distance(vec2(local_prev_character->x, local_prev_character->y), + vec2(local_character->x, local_character->y)); + + char buf[512]; + sprintf(buf, "%f", speed); + gfx_pretty_text(150, 50, 24, buf, -1); } // render score board |