mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
added cl_showfps. removed cl_show_player_ids
This commit is contained in:
parent
f10958c450
commit
61535a565a
|
@ -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);
|
||||
|
|
|
@ -3,7 +3,8 @@ MACRO_CONFIG_INT(cl_predict, 1, 0, 1)
|
|||
MACRO_CONFIG_INT(cl_nameplates, 0, 0, 1)
|
||||
MACRO_CONFIG_INT(cl_nameplates_always, 0, 0, 1)
|
||||
MACRO_CONFIG_INT(cl_autoswitch_weapons, 0, 0, 1)
|
||||
MACRO_CONFIG_INT(cl_show_player_ids, 0, 0, 1)
|
||||
|
||||
MACRO_CONFIG_INT(cl_showfps, 0, 0, 1)
|
||||
|
||||
|
||||
MACRO_CONFIG_INT(cl_warning_tuning, 1, 0, 1)
|
||||
|
|
Loading…
Reference in a new issue