Fixed left turn mirroring and filter turn signals

This commit is contained in:
Dander7BD 2014-02-20 11:17:11 +01:00
parent 89c52d34f4
commit d945eea992
3 changed files with 8 additions and 2 deletions

View File

@ -327,7 +327,11 @@ void GameState::ReadKeyInput()
{ {
static const float mouseSensitivity = Radian( 1.0f ); static const float mouseSensitivity = Radian( 1.0f );
this->privData->camera.PitchDown( this->privData->input->GetPitch() * mouseSensitivity ); 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 // shoot

View File

@ -28,6 +28,7 @@
<ClCompile Include="Source\Win32\Win32Mouse.cpp" /> <ClCompile Include="Source\Win32\Win32Mouse.cpp" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="Include\ApplicationKeyboard.h" />
<ClInclude Include="Include\Common.h" /> <ClInclude Include="Include\Common.h" />
<ClInclude Include="Include\Input.h" /> <ClInclude Include="Include\Input.h" />
<ClInclude Include="Include\InputManager.h" /> <ClInclude Include="Include\InputManager.h" />
@ -35,6 +36,7 @@
<ClInclude Include="Include\Keyboard.h" /> <ClInclude Include="Include\Keyboard.h" />
<ClInclude Include="Include\Mouse.h" /> <ClInclude Include="Include\Mouse.h" />
<ClInclude Include="Include\PreReq.h" /> <ClInclude Include="Include\PreReq.h" />
<ClInclude Include="Include\Win32\Win32ApplicationKeyboard.h" />
<ClInclude Include="Include\Win32\Win32Input.h" /> <ClInclude Include="Include\Win32\Win32Input.h" />
<ClInclude Include="Include\Win32\Win32Keyboard.h" /> <ClInclude Include="Include\Win32\Win32Keyboard.h" />
<ClInclude Include="Include\Win32\Win32Mouse.h" /> <ClInclude Include="Include\Win32\Win32Mouse.h" />

View File

@ -189,7 +189,7 @@ float InputClass::GetPitch( )
float InputClass::GetYaw( ) float InputClass::GetYaw( )
{ {
float dX = (static_cast<float>( m_mouseState.lX)/5); float dX = (static_cast<float>( m_mouseState.lX)/5);
return -dX; return dX;
} }
bool InputClass::IsMousePressed() bool InputClass::IsMousePressed()