1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-03-29 13:20:35 +00:00

Removed redundant if.

This commit is contained in:
dteviot 2015-08-04 18:17:08 +12:00
parent 4256e151b1
commit ad9bab0b68

View File

@ -503,12 +503,14 @@ namespace MWMechanics
}
// don't use pathgrid when actor can move in 3 dimensions
if(canMoveByZ) preferShortcut = true;
if (canMoveByZ)
{
preferShortcut = true;
movement.mRotation[0] = getXAngleToDir(vDirToTarget, distToTarget);
}
if(preferShortcut)
{
if (canMoveByZ)
movement.mRotation[0] = getXAngleToDir(vDirToTarget, distToTarget);
movement.mRotation[2] = getZAngleToDir(vDirToTarget);
forceNoShortcut = false;
shortcutFailPos.pos[0] = shortcutFailPos.pos[1] = shortcutFailPos.pos[2] = 0;