mirror of
https://github.com/OpenMW/openmw.git
synced 2025-03-27 05:10:26 +00:00
Fix jumping when using move360 with a controller
This commit is contained in:
parent
1ca0a3a555
commit
5f0a7c2b16
2 changed files with 2 additions and 2 deletions
|
@ -277,7 +277,7 @@ namespace MWInput
|
||||||
{
|
{
|
||||||
gamepadToGuiControl(arg);
|
gamepadToGuiControl(arg);
|
||||||
}
|
}
|
||||||
else if (MWBase::Environment::get().getWorld()->isPreviewModeEnabled() &&
|
else if (mBindingsManager->actionIsActive(A_TogglePOV) &&
|
||||||
(arg.axis == SDL_CONTROLLER_AXIS_TRIGGERRIGHT || arg.axis == SDL_CONTROLLER_AXIS_TRIGGERLEFT))
|
(arg.axis == SDL_CONTROLLER_AXIS_TRIGGERRIGHT || arg.axis == SDL_CONTROLLER_AXIS_TRIGGERLEFT))
|
||||||
{
|
{
|
||||||
// Preview Mode Gamepad Zooming; do not propagate to mBindingsManager
|
// Preview Mode Gamepad Zooming; do not propagate to mBindingsManager
|
||||||
|
|
|
@ -135,7 +135,7 @@ local function zoom(delta)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function applyControllerZoom(dt)
|
local function applyControllerZoom(dt)
|
||||||
if camera.getMode() == MODE.Preview then
|
if input.isActionPressed(input.ACTION.TogglePOV) then
|
||||||
local triggerLeft = input.getAxisValue(input.CONTROLLER_AXIS.TriggerLeft)
|
local triggerLeft = input.getAxisValue(input.CONTROLLER_AXIS.TriggerLeft)
|
||||||
local triggerRight = input.getAxisValue(input.CONTROLLER_AXIS.TriggerRight)
|
local triggerRight = input.getAxisValue(input.CONTROLLER_AXIS.TriggerRight)
|
||||||
local controllerZoom = (triggerRight - triggerLeft) * 100 * dt
|
local controllerZoom = (triggerRight - triggerLeft) * 100 * dt
|
||||||
|
|
Loading…
Reference in a new issue