mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-27 06:55:54 -04:00
Clear the movement and rotation vector when getting them
This commit is contained in:
parent
7b02ec411b
commit
b6f2b39a2f
@ -414,12 +414,22 @@ namespace MWClass
|
||||
|
||||
Ogre::Vector3 Npc::getMovementVector (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
return Ogre::Vector3(getMovementSettings(ptr).mPosition);
|
||||
MWMechanics::Movement &movement = getMovementSettings(ptr);
|
||||
Ogre::Vector3 vec(movement.mPosition);
|
||||
movement.mPosition[0] = 0.0f;
|
||||
movement.mPosition[1] = 0.0f;
|
||||
movement.mPosition[2] = 0.0f;
|
||||
return vec;
|
||||
}
|
||||
|
||||
Ogre::Vector3 Npc::getRotationVector (const MWWorld::Ptr& ptr) const
|
||||
{
|
||||
return Ogre::Vector3(getMovementSettings(ptr).mRotation);
|
||||
MWMechanics::Movement &movement = getMovementSettings(ptr);
|
||||
Ogre::Vector3 vec(movement.mRotation);
|
||||
movement.mRotation[0] = 0.0f;
|
||||
movement.mRotation[1] = 0.0f;
|
||||
movement.mRotation[2] = 0.0f;
|
||||
return vec;
|
||||
}
|
||||
|
||||
bool Npc::isEssential (const MWWorld::Ptr& ptr) const
|
||||
|
@ -288,8 +288,6 @@ namespace MWInput
|
||||
triedToMove = true;
|
||||
mPlayer.setLeftRight (1);
|
||||
}
|
||||
else
|
||||
mPlayer.setLeftRight (0);
|
||||
|
||||
if (actionIsActive(A_MoveForward))
|
||||
{
|
||||
@ -303,8 +301,6 @@ namespace MWInput
|
||||
mPlayer.setAutoMove (false);
|
||||
mPlayer.setForwardBackward (-1);
|
||||
}
|
||||
else
|
||||
mPlayer.setForwardBackward (0);
|
||||
|
||||
mPlayer.setSneak(actionIsActive(A_Sneak));
|
||||
|
||||
@ -313,8 +309,6 @@ namespace MWInput
|
||||
mPlayer.setUpDown (1);
|
||||
triedToMove = true;
|
||||
}
|
||||
else
|
||||
mPlayer.setUpDown (0);
|
||||
|
||||
if (mAlwaysRunActive)
|
||||
mPlayer.setRunState(!actionIsActive(A_Run));
|
||||
|
Loading…
x
Reference in New Issue
Block a user