diff --git a/src/engine/client/client.cpp b/src/engine/client/client.cpp index bac7377cf..70ac7cde6 100644 --- a/src/engine/client/client.cpp +++ b/src/engine/client/client.cpp @@ -81,15 +81,15 @@ static const ColorRGBA ClientNetworkErrPrintColor{1.0f, 0.25f, 0.25f, 1.0f}; void CGraph::Init(float Min, float Max) { - m_Min = Min; - m_Max = Max; + m_MinRange = m_Min = Min; + m_MaxRange = m_Max = Max; m_Index = 0; } void CGraph::ScaleMax() { int i = 0; - m_Max = 0; + m_Max = m_MaxRange; for(i = 0; i < MAX_VALUES; i++) { if(m_aValues[i] > m_Max) @@ -100,7 +100,7 @@ void CGraph::ScaleMax() void CGraph::ScaleMin() { int i = 0; - m_Min = m_Max; + m_Min = m_MinRange; for(i = 0; i < MAX_VALUES; i++) { if(m_aValues[i] < m_Min) @@ -1089,7 +1089,11 @@ void CClient::DebugRender() m_FpsGraph.ScaleMax(); m_FpsGraph.ScaleMin(); m_FpsGraph.Render(Graphics(), m_DebugFont, x, sp * 5, w, h, "FPS"); + m_InputtimeMarginGraph.ScaleMin(); + m_InputtimeMarginGraph.ScaleMax(); m_InputtimeMarginGraph.Render(Graphics(), m_DebugFont, x, sp * 5 + h + sp, w, h, "Prediction Margin"); + m_GametimeMarginGraph.ScaleMin(); + m_GametimeMarginGraph.ScaleMax(); m_GametimeMarginGraph.Render(Graphics(), m_DebugFont, x, sp * 5 + h + sp + h + sp, w, h, "Gametime Margin"); } } @@ -3123,7 +3127,7 @@ void CClient::Run() */ // - m_FpsGraph.Init(0.0f, 200.0f); + m_FpsGraph.Init(0.0f, 120.0f); // never start with the editor g_Config.m_ClEditor = 0; diff --git a/src/engine/client/client.h b/src/engine/client/client.h index 616df0204..b8856ba21 100644 --- a/src/engine/client/client.h +++ b/src/engine/client/client.h @@ -41,6 +41,7 @@ public: }; float m_Min, m_Max; + float m_MinRange, m_MaxRange; float m_aValues[MAX_VALUES]; float m_aColors[MAX_VALUES][3]; int m_Index;