From d945eea9928b05b9e25067f18e07b156004c8279 Mon Sep 17 00:00:00 2001 From: Dander7BD Date: Thu, 20 Feb 2014 11:17:11 +0100 Subject: [PATCH] Fixed left turn mirroring and filter turn signals --- Code/Game/GameClient/GameClientState/GameState.cpp | 6 +++++- Code/Misc/Input/Input.vcxproj | 2 ++ Code/Misc/Input/L_inputClass.cpp | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Code/Game/GameClient/GameClientState/GameState.cpp b/Code/Game/GameClient/GameClientState/GameState.cpp index 462422a6..a4e22bbc 100644 --- a/Code/Game/GameClient/GameClientState/GameState.cpp +++ b/Code/Game/GameClient/GameClientState/GameState.cpp @@ -327,7 +327,11 @@ void GameState::ReadKeyInput() { static const float mouseSensitivity = Radian( 1.0f ); this->privData->camera.PitchDown( this->privData->input->GetPitch() * mouseSensitivity ); - this->privData->nwClient->Send( Protocol_PlayerLeftTurn(this->privData->input->GetYaw() * mouseSensitivity) ); + float yaw = this->privData->input->GetYaw(); + if( yaw != 0.0f ) + { + this->privData->nwClient->Send( Protocol_PlayerLeftTurn(yaw * mouseSensitivity) ); + } } // shoot diff --git a/Code/Misc/Input/Input.vcxproj b/Code/Misc/Input/Input.vcxproj index 8642e69e..6e945f94 100644 --- a/Code/Misc/Input/Input.vcxproj +++ b/Code/Misc/Input/Input.vcxproj @@ -28,6 +28,7 @@ + @@ -35,6 +36,7 @@ + diff --git a/Code/Misc/Input/L_inputClass.cpp b/Code/Misc/Input/L_inputClass.cpp index 03271333..c0fe6a63 100644 --- a/Code/Misc/Input/L_inputClass.cpp +++ b/Code/Misc/Input/L_inputClass.cpp @@ -189,7 +189,7 @@ float InputClass::GetPitch( ) float InputClass::GetYaw( ) { float dX = (static_cast( m_mouseState.lX)/5); - return -dX; + return dX; } bool InputClass::IsMousePressed()