mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Always send correct zoom dimensions
This commit is contained in:
parent
f92fa2b4ae
commit
7aa4652715
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue