Removed the requirement to have the Freelook option enabled for the freelook hotkeys to work.

This commit is contained in:
skidau 2015-02-28 16:40:24 +11:00
parent d080632527
commit d2abbcd353
1 changed files with 21 additions and 24 deletions

View File

@ -1440,30 +1440,27 @@ void CFrame::ParseHotkeys(wxKeyEvent &event)
OnConnectWiimote(evt); OnConnectWiimote(evt);
} }
if (g_Config.bFreeLook) static float debugSpeed = 1.0f;
{
static float debugSpeed = 1.0f;
if (IsHotkey(event, HK_FREELOOK_DECREASE_SPEED)) if (IsHotkey(event, HK_FREELOOK_DECREASE_SPEED))
debugSpeed /= 2.0f; debugSpeed /= 2.0f;
else if (IsHotkey(event, HK_FREELOOK_INCREASE_SPEED)) else if (IsHotkey(event, HK_FREELOOK_INCREASE_SPEED))
debugSpeed *= 2.0f; debugSpeed *= 2.0f;
else if (IsHotkey(event, HK_FREELOOK_RESET_SPEED)) else if (IsHotkey(event, HK_FREELOOK_RESET_SPEED))
debugSpeed = 1.0f; debugSpeed = 1.0f;
else if (IsHotkey(event, HK_FREELOOK_UP)) else if (IsHotkey(event, HK_FREELOOK_UP))
VertexShaderManager::TranslateView(0.0f, 0.0f, -debugSpeed); VertexShaderManager::TranslateView(0.0f, 0.0f, -debugSpeed);
else if (IsHotkey(event, HK_FREELOOK_DOWN)) else if (IsHotkey(event, HK_FREELOOK_DOWN))
VertexShaderManager::TranslateView(0.0f, 0.0f, debugSpeed); VertexShaderManager::TranslateView(0.0f, 0.0f, debugSpeed);
else if (IsHotkey(event, HK_FREELOOK_LEFT)) else if (IsHotkey(event, HK_FREELOOK_LEFT))
VertexShaderManager::TranslateView(debugSpeed, 0.0f); VertexShaderManager::TranslateView(debugSpeed, 0.0f);
else if (IsHotkey(event, HK_FREELOOK_RIGHT)) else if (IsHotkey(event, HK_FREELOOK_RIGHT))
VertexShaderManager::TranslateView(-debugSpeed, 0.0f); VertexShaderManager::TranslateView(-debugSpeed, 0.0f);
else if (IsHotkey(event, HK_FREELOOK_ZOOM_IN)) else if (IsHotkey(event, HK_FREELOOK_ZOOM_IN))
VertexShaderManager::TranslateView(0.0f, debugSpeed); VertexShaderManager::TranslateView(0.0f, debugSpeed);
else if (IsHotkey(event, HK_FREELOOK_ZOOM_OUT)) else if (IsHotkey(event, HK_FREELOOK_ZOOM_OUT))
VertexShaderManager::TranslateView(0.0f, -debugSpeed); VertexShaderManager::TranslateView(0.0f, -debugSpeed);
else if (IsHotkey(event, HK_FREELOOK_RESET)) else if (IsHotkey(event, HK_FREELOOK_RESET))
VertexShaderManager::ResetView(); VertexShaderManager::ResetView();
}
} }
} }