Always send correct zoom dimensions

This commit is contained in:
fokkonaut 2021-09-11 00:14:02 +02:00
parent f92fa2b4ae
commit 7aa4652715
2 changed files with 2 additions and 2 deletions

View file

@ -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;

View file

@ -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;