mirror of
https://github.com/LCEMP/LCEMP.git
synced 2026-05-26 00:04:37 +00:00
Mouse improvements
Mouse look was previously being changed on Input::tick which only runs 20 times per second and then it was interpolated to make it feel better. I moved it to the WndProc function and stopped interpolating. I also changed the mouseLookScale to 1 because it was a lot faster than before.
This commit is contained in:
@@ -164,25 +164,6 @@ void Input::tick(LocalPlayer *player)
|
||||
|
||||
player->interpolateTurn(tx* abs(tx)* turnSpeed, ty* abs(ty)* turnSpeed);
|
||||
|
||||
#ifdef _WINDOWS64
|
||||
if (iPad == 0 && g_KBMInput.IsMouseGrabbed() && g_KBMInput.IsKBMActive())
|
||||
{
|
||||
int dx = g_KBMInput.GetRawDeltaX();
|
||||
int dy = g_KBMInput.GetRawDeltaY();
|
||||
g_KBMInput.ConsumeMouseDelta();
|
||||
if (dx != 0 || dy != 0)
|
||||
{
|
||||
float mouseSensitivity = ((float)app.GetGameSettings(iPad, eGameSetting_Sensitivity_InGame)) / 100.0f;
|
||||
float mouseLookScale = 5.0f;
|
||||
float mdx = dx * mouseSensitivity * mouseLookScale;
|
||||
float mdy = -dy * mouseSensitivity * mouseLookScale;
|
||||
if (app.GetGameSettings(iPad, eGameSetting_ControlInvertLook))
|
||||
mdy = -mdy;
|
||||
player->interpolateTurn(mdx, mdy);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
//jumping = controller.isButtonPressed(0);
|
||||
|
||||
unsigned int jump = InputManager.GetValue(iPad, MINECRAFT_ACTION_JUMP);
|
||||
|
||||
Reference in New Issue
Block a user