forked from teamnwah/openmw-tes3coop
Removed redundant if.
This commit is contained in:
parent
4256e151b1
commit
ad9bab0b68
1 changed files with 5 additions and 3 deletions
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue