[Client] Fix rotation sync

This commit is contained in:
David Cernat 2021-07-26 08:50:19 +02:00
parent 0567dc1fd4
commit 6bdc2b2b06

View File

@ -2127,9 +2127,6 @@ void CharacterController::update(float duration)
movementSettings.mPosition[2] = onground ? 1 : 0;
}
osg::Vec3f rot = cls.getRotationVector(mPtr);
osg::Vec3f vec(movementSettings.asVec3());
/*
Start of tes3mp addition
@ -2162,6 +2159,9 @@ void CharacterController::update(float duration)
End of tes3mp addition
*/
osg::Vec3f rot = cls.getRotationVector(mPtr);
osg::Vec3f vec(movementSettings.asVec3());
movementSettings.mSpeedFactor = std::min(vec.length(), 1.f);
vec.normalize();