From 45bab9512700420789989ddd5e246f6efda8d01d Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Sun, 6 May 2012 02:11:19 +0000 Subject: [PATCH] input: do not let the joystick override the keyboard. --- src/camera.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/camera.cpp b/src/camera.cpp index 60d1f884..e198bf2a 100644 --- a/src/camera.cpp +++ b/src/camera.cpp @@ -71,8 +71,8 @@ void Camera::TickGame(float seconds) stick = Input::TrackStick(); if (stick && stick->GetAxisCount() >= 2) { - rightleft = 2.f * stick->GetAxis(0) * std::abs(stick->GetAxis(0)); - updown = -2.f * stick->GetAxis(1) * std::abs(stick->GetAxis(1)); + rightleft += 2.f * stick->GetAxis(0) * std::abs(stick->GetAxis(0)); + updown += -2.f * stick->GetAxis(1) * std::abs(stick->GetAxis(1)); } m_position += vec3(rightleft, pgupdown, -updown) * 200.f * seconds;