about summary refs log tree commit diff
path: root/src/engine/client
diff options
context:
space:
mode:
authoroy <Tom_Adams@web.de>2010-10-13 12:47:42 +0200
committeroy <Tom_Adams@web.de>2010-10-13 12:47:42 +0200
commite4fe7457c8acdb479e91a79cf832c48d10898be5 (patch)
treee16e3d219060b1f366720c1663ef661086c8224e /src/engine/client
parentc828f7d725d9b243e094b44f62a844a9b47790a5 (diff)
downloadzcatch-e4fe7457c8acdb479e91a79cf832c48d10898be5.tar.gz
zcatch-e4fe7457c8acdb479e91a79cf832c48d10898be5.zip
fixed problems with the mouse movement. Closes #214
Diffstat (limited to 'src/engine/client')
-rw-r--r--src/engine/client/input.cpp6
-rw-r--r--src/engine/client/input.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/engine/client/input.cpp b/src/engine/client/input.cpp
index bf3e703c..ff41550f 100644
--- a/src/engine/client/input.cpp
+++ b/src/engine/client/input.cpp
@@ -48,7 +48,7 @@ void CInput::Init()
 	SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY, SDL_DEFAULT_REPEAT_INTERVAL);
 }
 
-void CInput::MouseRelative(int *x, int *y)
+void CInput::MouseRelative(float *x, float *y)
 {
 	int nx = 0, ny = 0;
 	float Sens = g_Config.m_InpMousesens/100.0f;
@@ -65,8 +65,8 @@ void CInput::MouseRelative(int *x, int *y)
 		}
 	}
 
-	*x = (int)(nx*Sens);
-	*y = (int)(ny*Sens);
+	*x = nx*Sens;
+	*y = ny*Sens;
 }
 
 void CInput::MouseModeAbsolute()
diff --git a/src/engine/client/input.h b/src/engine/client/input.h
index aeaefca1..2f5b00bf 100644
--- a/src/engine/client/input.h
+++ b/src/engine/client/input.h
@@ -19,7 +19,7 @@ public:
 
 	virtual void Init();
 
-	virtual void MouseRelative(int *x, int *y);
+	virtual void MouseRelative(float *x, float *y);
 	virtual void MouseModeAbsolute();
 	virtual void MouseModeRelative();
 	virtual int MouseDoubleClick();