From 74844c98a6dd1239a906e71015f85c0217304b38 Mon Sep 17 00:00:00 2001 From: def Date: Fri, 23 May 2014 19:28:26 +0200 Subject: [PATCH] Fix camera with dummy --- src/game/client/components/camera.cpp | 4 ++-- src/game/client/components/camera.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/game/client/components/camera.cpp b/src/game/client/components/camera.cpp index 4e3ab8af2..6e7aa0f43 100644 --- a/src/game/client/components/camera.cpp +++ b/src/game/client/components/camera.cpp @@ -31,7 +31,7 @@ void CCamera::OnRender() { if(m_CamType != CAMTYPE_SPEC) { - m_LastPos = m_pClient->m_pControls->m_MousePos[g_Config.m_ClDummy]; + m_LastPos[g_Config.m_ClDummy] = m_pClient->m_pControls->m_MousePos[g_Config.m_ClDummy]; m_pClient->m_pControls->m_MousePos[g_Config.m_ClDummy] = m_PrevCenter; m_pClient->m_pControls->ClampMousePos(); m_CamType = CAMTYPE_SPEC; @@ -42,7 +42,7 @@ void CCamera::OnRender() { if(m_CamType != CAMTYPE_PLAYER) { - m_pClient->m_pControls->m_MousePos[g_Config.m_ClDummy] = m_LastPos; + m_pClient->m_pControls->m_MousePos[g_Config.m_ClDummy] = m_LastPos[g_Config.m_ClDummy]; m_pClient->m_pControls->ClampMousePos(); m_CamType = CAMTYPE_PLAYER; } diff --git a/src/game/client/components/camera.h b/src/game/client/components/camera.h index 095449b31..85470fd52 100644 --- a/src/game/client/components/camera.h +++ b/src/game/client/components/camera.h @@ -15,7 +15,7 @@ class CCamera : public CComponent }; int m_CamType; - vec2 m_LastPos; + vec2 m_LastPos[2]; vec2 m_PrevCenter; public: