mirror of
https://github.com/OpenMW/openmw.git
synced 2025-03-30 13:36:42 +00:00
FIX(character.cpp): Don't allow turn to movement direction to apply to non-bipeds
This commit is contained in:
parent
c95c7503a8
commit
33cd654bf5
1 changed files with 3 additions and 2 deletions
|
@ -2042,7 +2042,8 @@ namespace MWMechanics
|
|||
float effectiveRotation = rot.z();
|
||||
bool canMove = cls.getMaxSpeed(mPtr) > 0;
|
||||
const bool turnToMovementDirection = Settings::game().mTurnToMovementDirection;
|
||||
if (!turnToMovementDirection || isFirstPersonPlayer)
|
||||
const bool isBiped = mPtr.getClass().isBipedal(mPtr);
|
||||
if (!isBiped || !turnToMovementDirection || isFirstPersonPlayer)
|
||||
{
|
||||
movementSettings.mIsStrafing = std::abs(vec.x()) > std::abs(vec.y()) * 2;
|
||||
stats.setSideMovementAngle(0);
|
||||
|
@ -2296,7 +2297,7 @@ namespace MWMechanics
|
|||
}
|
||||
}
|
||||
|
||||
if (turnToMovementDirection && !isFirstPersonPlayer
|
||||
if (turnToMovementDirection && !isFirstPersonPlayer && isBiped
|
||||
&& (movestate == CharState_SwimRunForward || movestate == CharState_SwimWalkForward
|
||||
|| movestate == CharState_SwimRunBack || movestate == CharState_SwimWalkBack))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue