mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-27 23:21:20 -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
|
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
|
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
|
bool Npc::isEssential (const MWWorld::Ptr& ptr) const
|
||||||
|
@ -288,8 +288,6 @@ namespace MWInput
|
|||||||
triedToMove = true;
|
triedToMove = true;
|
||||||
mPlayer.setLeftRight (1);
|
mPlayer.setLeftRight (1);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
mPlayer.setLeftRight (0);
|
|
||||||
|
|
||||||
if (actionIsActive(A_MoveForward))
|
if (actionIsActive(A_MoveForward))
|
||||||
{
|
{
|
||||||
@ -303,8 +301,6 @@ namespace MWInput
|
|||||||
mPlayer.setAutoMove (false);
|
mPlayer.setAutoMove (false);
|
||||||
mPlayer.setForwardBackward (-1);
|
mPlayer.setForwardBackward (-1);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
mPlayer.setForwardBackward (0);
|
|
||||||
|
|
||||||
mPlayer.setSneak(actionIsActive(A_Sneak));
|
mPlayer.setSneak(actionIsActive(A_Sneak));
|
||||||
|
|
||||||
@ -313,8 +309,6 @@ namespace MWInput
|
|||||||
mPlayer.setUpDown (1);
|
mPlayer.setUpDown (1);
|
||||||
triedToMove = true;
|
triedToMove = true;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
mPlayer.setUpDown (0);
|
|
||||||
|
|
||||||
if (mAlwaysRunActive)
|
if (mAlwaysRunActive)
|
||||||
mPlayer.setRunState(!actionIsActive(A_Run));
|
mPlayer.setRunState(!actionIsActive(A_Run));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user