Fix broken AI movement on Z axis

This commit is contained in:
scrawl 2014-06-17 15:25:54 +02:00
parent cb6f1d3a52
commit 4f9ebd148c

View file

@ -470,6 +470,8 @@ namespace MWMechanics
if(preferShortcut) if(preferShortcut)
{ {
if (canMoveByZ)
mMovement.mRotation[0] = getXAngleToDir(vDirToTarget, distToTarget);
mMovement.mRotation[2] = getZAngleToDir(vDirToTarget, distToTarget); mMovement.mRotation[2] = getZAngleToDir(vDirToTarget, distToTarget);
mForceNoShortcut = false; mForceNoShortcut = false;
mShortcutFailPos.pos[0] = mShortcutFailPos.pos[1] = mShortcutFailPos.pos[2] = 0; mShortcutFailPos.pos[0] = mShortcutFailPos.pos[1] = mShortcutFailPos.pos[2] = 0;