about summary refs log tree commit diff
path: root/src/game/client
diff options
context:
space:
mode:
authoroy <Tom_Adams@web.de>2010-09-19 16:12:18 +0200
committeroy <Tom_Adams@web.de>2010-09-19 16:12:18 +0200
commita730704d10be1db5459b2ddb0ec0db50335b1279 (patch)
treedb7774be2dc8fb7e12a5cd69707061004241ce1c /src/game/client
parent80b570c7952ef6cc4f54b4cbb1b873a5b770a5d7 (diff)
downloadzcatch-a730704d10be1db5459b2ddb0ec0db50335b1279.tar.gz
zcatch-a730704d10be1db5459b2ddb0ec0db50335b1279.zip
fixed view offset when joining spectator. Closes #101
Diffstat (limited to 'src/game/client')
-rw-r--r--src/game/client/components/camera.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/game/client/components/camera.cpp b/src/game/client/components/camera.cpp
index 185f02c5..e6806114 100644
--- a/src/game/client/components/camera.cpp
+++ b/src/game/client/components/camera.cpp
@@ -21,8 +21,12 @@ void CCamera::OnRender()
 	// update camera center		
 	if(m_pClient->m_Snap.m_Spectate)
 	{
+		if(!m_WasSpectator)
+		{
+			m_pClient->m_pControls->ClampMousePos();
+			m_WasSpectator = true;
+		}
 		m_Center = m_pClient->m_pControls->m_MousePos;
-		m_WasSpectator = true;
 	}
 	else
 	{