pull/593/head
Petr Mikheev 4 years ago
parent 165fa1c376
commit 874c754b68

@ -44,6 +44,7 @@
Bug #5531: Actors flee using current rotation by axis x
Bug #5539: Window resize breaks when going from a lower resolution to full screen resolution
Bug #5548: Certain exhausted topics can be highlighted again even though there's no new dialogue
Bug #5557: Diagonal movement is noticeably slower with analogue stick
Feature #390: 3rd person look "over the shoulder"
Feature #2386: Distant Statics in the form of Object Paging
Feature #5297: Add a search function to the "Datafiles" tab of the OpenMW launcher

@ -141,7 +141,7 @@ namespace MWInput
float xAxis = mBindingsManager->getActionValue(A_MoveLeftRight);
float yAxis = mBindingsManager->getActionValue(A_MoveForwardBackward);
bool isRunning = xAxis > .75 || xAxis < .25 || yAxis > .75 || yAxis < .25;
bool isRunning = osg::Vec2f(xAxis * 2 - 1, yAxis * 2 - 1).length2() > 0.25f;
if ((mAlwaysRunActive && alwaysRunAllowed) || isRunning)
player.setRunState(!mBindingsManager->actionIsActive(A_Run));
else

@ -1954,20 +1954,15 @@ void CharacterController::update(float duration, bool animationOnly)
osg::Vec3f rot = cls.getRotationVector(mPtr);
osg::Vec3f vec(movementSettings.asVec3());
if (isPlayer)
{
// TODO: Move this code to mwinput.
// Joystick analogue movement.
movementSettings.mSpeedFactor = std::max(std::abs(vec.x()), std::abs(vec.y()));
// Due to the half way split between walking/running, we multiply speed by 2 while walking, unless a keyboard was used.
if(!isrunning && !sneak && !flying && movementSettings.mSpeedFactor <= 0.5f)
movementSettings.mSpeedFactor *= 2.f;
} else
movementSettings.mSpeedFactor = std::min(vec.length(), 1.f);
movementSettings.mSpeedFactor = std::min(vec.length(), 1.f);
vec.normalize();
// TODO: Move this check to mwinput.
// Joystick analogue movement.
// Due to the half way split between walking/running, we multiply speed by 2 while walking, unless a keyboard was used.
if (isPlayer && !isrunning && !sneak && !flying && movementSettings.mSpeedFactor <= 0.5f)
movementSettings.mSpeedFactor *= 2.f;
float effectiveRotation = rot.z();
bool canMove = cls.getMaxSpeed(mPtr) > 0;
static const bool turnToMovementDirection = Settings::Manager::getBool("turn to movement direction", "Game");

Loading…
Cancel
Save