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 // 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(preferShortcut)
{ {
if (canMoveByZ)
movement.mRotation[0] = getXAngleToDir(vDirToTarget, distToTarget);
movement.mRotation[2] = getZAngleToDir(vDirToTarget); movement.mRotation[2] = getZAngleToDir(vDirToTarget);
forceNoShortcut = false; forceNoShortcut = false;
shortcutFailPos.pos[0] = shortcutFailPos.pos[1] = shortcutFailPos.pos[2] = 0; shortcutFailPos.pos[0] = shortcutFailPos.pos[1] = shortcutFailPos.pos[2] = 0;