From cd4e5ae0ec8c7ee97679eca8c57604f39d95ec5b Mon Sep 17 00:00:00 2001 From: Dander7BD Date: Wed, 19 Feb 2014 14:00:36 +0100 Subject: [PATCH] compilation error fixes --- Code/Game/GameClient/GameClientState/GameState.cpp | 8 +++----- Code/Game/GameClient/GameClientState/GamingUI.cpp | 10 +++++----- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/Code/Game/GameClient/GameClientState/GameState.cpp b/Code/Game/GameClient/GameClientState/GameState.cpp index 7ab0aeac..af5f467e 100644 --- a/Code/Game/GameClient/GameClientState/GameState.cpp +++ b/Code/Game/GameClient/GameClientState/GameState.cpp @@ -319,11 +319,9 @@ void GameState::ReadKeyInput() //send delta mouse movement { - this->privData->camera.YawRight( this->privData->input->GetYaw() * 0.017f ); - this->privData->camera.PitchDown( this->privData->input->GetPitch() * 0.017f ); - this->privData->camera.UpdateOrientation(); - - privData->nwClient->Send( Protocol_PlayerLook(this->privData->camera.GetLook(), this->privData->camera.GetRight()) ); + 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) ); } // shoot diff --git a/Code/Game/GameClient/GameClientState/GamingUI.cpp b/Code/Game/GameClient/GameClientState/GamingUI.cpp index a2edc28f..8ff43d88 100644 --- a/Code/Game/GameClient/GameClientState/GamingUI.cpp +++ b/Code/Game/GameClient/GameClientState/GamingUI.cpp @@ -1,9 +1,11 @@ #include "GamingUI.h" #include +#include "Utilities.h" using namespace ::DanBias::Client; using namespace ::Oyster::Network; using namespace ::GameLogic; +using namespace ::Utility::Value; GamingUI::GamingUI() : GameStateUI() @@ -92,11 +94,9 @@ void GamingUI::ReadKeyInput() //send delta mouse movement { - this->camera->YawRight( this->input->GetYaw() * 0.017f ); - this->camera->PitchDown( this->input->GetPitch() * 0.017f ); - this->camera->UpdateOrientation(); - - this->netClient->Send( Protocol_PlayerLook(this->camera->GetLook(), this->camera->GetRight()) ); + static const float mouseSensitivity = Radian( 1.0f ); + this->camera->PitchDown( this->input->GetPitch() * mouseSensitivity ); + this->netClient->Send( Protocol_PlayerLeftTurn(this->input->GetYaw() * mouseSensitivity) ); } // shoot