diff --git a/src/game/client/components/camera.h b/src/game/client/components/camera.h index 7ef3c6785..6631ab49a 100644 --- a/src/game/client/components/camera.h +++ b/src/game/client/components/camera.h @@ -21,7 +21,6 @@ class CCamera : public CComponent vec2 m_LastPos[NUM_DUMMIES]; vec2 m_PrevCenter; - bool m_Zooming; CCubicBezier m_ZoomSmoothing; float m_ZoomSmoothingStart; float m_ZoomSmoothingEnd; @@ -36,6 +35,7 @@ class CCamera : public CComponent public: vec2 m_Center; bool m_ZoomSet; + bool m_Zooming; float m_Zoom; float m_ZoomSmoothingTarget; diff --git a/src/game/client/gameclient.cpp b/src/game/client/gameclient.cpp index d3f56f491..0f5b1e928 100644 --- a/src/game/client/gameclient.cpp +++ b/src/game/client/gameclient.cpp @@ -1596,7 +1596,7 @@ void CGameClient::OnNewSnapshot() } float ZoomToSend = m_Camera.m_Zoom; - if(m_Camera.m_ZoomSmoothingTarget != .0) + if(m_Camera.m_Zooming) { if(m_Camera.m_ZoomSmoothingTarget > m_Camera.m_Zoom) // Zooming out ZoomToSend = m_Camera.m_ZoomSmoothingTarget;