diff --git a/src/engine/client/client.cpp b/src/engine/client/client.cpp index 2f40589f8..b7c2af9d4 100644 --- a/src/engine/client/client.cpp +++ b/src/engine/client/client.cpp @@ -84,11 +84,21 @@ static const ColorRGBA gs_ClientNetworkErrPrintColor{1.0f, 0.25f, 0.25f, 1.0f}; void CGraph::Init(float Min, float Max) { - m_MinRange = m_Min = Min; - m_MaxRange = m_Max = Max; + SetMin(Min); + SetMax(Max); m_Index = 0; } +void CGraph::SetMin(float Min) +{ + m_MinRange = m_Min = Min; +} + +void CGraph::SetMax(float Max) +{ + m_MaxRange = m_Max = Max; +} + void CGraph::Scale() { m_Min = m_MinRange; diff --git a/src/engine/client/client.h b/src/engine/client/client.h index 9c56db1f3..3b10f5a4b 100644 --- a/src/engine/client/client.h +++ b/src/engine/client/client.h @@ -47,13 +47,17 @@ public: MAX_VALUES = 128, }; +private: float m_Min, m_Max; float m_MinRange, m_MaxRange; float m_aValues[MAX_VALUES]; float m_aColors[MAX_VALUES][3]; size_t m_Index; +public: void Init(float Min, float Max); + void SetMin(float Min); + void SetMax(float Max); void Scale(); void Add(float v, float r, float g, float b); diff --git a/src/game/client/components/debughud.cpp b/src/game/client/components/debughud.cpp index 665656add..66a9754d7 100644 --- a/src/game/client/components/debughud.cpp +++ b/src/game/client/components/debughud.cpp @@ -183,7 +183,7 @@ void CDebugHud::RenderTuning() } if(i == 0) { - m_ZoomedInGraph.m_Min = m_ZoomedInGraph.m_MinRange = RampedSpeed; + m_ZoomedInGraph.SetMin(RampedSpeed); } pv = RampedSpeed; }