From 2b7809befdcd0632b32a9288488d66a3ed7b5388 Mon Sep 17 00:00:00 2001 From: def Date: Fri, 20 Oct 2017 22:27:53 +0200 Subject: [PATCH] Switch cl_showfps 1/2 --- ddnet-libs | 2 +- src/game/client/components/hud.cpp | 2 +- src/game/client/components/killmessages.cpp | 2 +- src/game/variables.h | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ddnet-libs b/ddnet-libs index 9abb67a94..3d28233cb 160000 --- a/ddnet-libs +++ b/ddnet-libs @@ -1 +1 @@ -Subproject commit 9abb67a94170fbf177b1d22ca180c96bd065cab1 +Subproject commit 3d28233cbc36a810e3164ace4bb61b62162519e5 diff --git a/src/game/client/components/hud.cpp b/src/game/client/components/hud.cpp index 62e188db9..7b557cdfe 100644 --- a/src/game/client/components/hud.cpp +++ b/src/game/client/components/hud.cpp @@ -321,7 +321,7 @@ void CHud::RenderTextInfo() float FPS = 1.0f / Client()->RenderFrameTime(); m_AverageFPS = (m_AverageFPS*(1.0f-(1.0f/m_AverageFPS))) + (FPS*(1.0f/m_AverageFPS)); char Buf[512]; - if(g_Config.m_ClShowfps == 1) + if(g_Config.m_ClShowfps == 2) str_format(Buf, sizeof(Buf), "%d", (int)m_AverageFPS); else str_format(Buf, sizeof(Buf), "%d", (int)FPS); diff --git a/src/game/client/components/killmessages.cpp b/src/game/client/components/killmessages.cpp index 0a1e44ef7..dd89337d0 100644 --- a/src/game/client/components/killmessages.cpp +++ b/src/game/client/components/killmessages.cpp @@ -54,7 +54,7 @@ void CKillMessages::OnRender() Graphics()->MapScreen(0, 0, Width*1.5f, Height*1.5f); float StartX = Width*1.5f-10.0f; - float y = 30.0f + 100.0f * (g_Config.m_ClShowfps + g_Config.m_ClShowpred); + float y = 30.0f + 100.0f * ((g_Config.m_ClShowfps ? 1 : 0) + g_Config.m_ClShowpred); for(int i = 1; i <= MAX_KILLMSGS; i++) { diff --git a/src/game/variables.h b/src/game/variables.h index fd1f890c4..0a6af42f1 100644 --- a/src/game/variables.h +++ b/src/game/variables.h @@ -1,4 +1,4 @@ -/* (c) Magnus Auvinen. See licence.txt in the root of the distribution for more information. */ + /* If you are missing that file, acquire a complete release at teeworlds.com. */ #ifndef GAME_VARIABLES_H #define GAME_VARIABLES_H @@ -35,7 +35,7 @@ MACRO_CONFIG_INT(ClShowChatFriends, cl_show_chat_friends, 0, 0, 1, CFGFLAG_CLIEN MACRO_CONFIG_INT(ClShowKillMessages, cl_showkillmessages, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Show kill messages") MACRO_CONFIG_INT(ClShowVotesAfterVoting, cl_show_votes_after_voting, 0, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Show votes window after voting") MACRO_CONFIG_INT(ClShowLocalTimeAlways, cl_show_local_time_always, 0, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Always show local time") -MACRO_CONFIG_INT(ClShowfps, cl_showfps, 0, 0, 2, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Show ingame FPS counter. 1: Average FPS 2: Current FPS") +MACRO_CONFIG_INT(ClShowfps, cl_showfps, 0, 0, 2, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Show ingame FPS counter. 1: Current FPS 2: Average FPS") MACRO_CONFIG_INT(ClShowpred, cl_showpred, 0, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Show ingame prediction time in milliseconds") MACRO_CONFIG_INT(ClEyeWheel, cl_eye_wheel, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Show eye wheel along together with emotes") MACRO_CONFIG_INT(ClEyeDuration, cl_eye_duration, 999999, 1, 999999, CFGFLAG_CLIENT|CFGFLAG_SAVE, "How long the eyes emotes last")