diff --git a/apps/openmw/mwmp/DedicatedPlayer.cpp b/apps/openmw/mwmp/DedicatedPlayer.cpp index 012796673..57258762c 100644 --- a/apps/openmw/mwmp/DedicatedPlayer.cpp +++ b/apps/openmw/mwmp/DedicatedPlayer.cpp @@ -4,6 +4,7 @@ #include #include +#include #include "../mwbase/environment.hpp" @@ -117,12 +118,15 @@ void DedicatedPlayer::move(float dt) world->moveObject(ptr, position.pos[0], position.pos[1], position.pos[2]); } - world->rotateObject(ptr, position.rot[0], 0, position.rot[2]); + float oldZ = ptr.getRefData().getPosition().rot[2]; + world->rotateObject(ptr, position.rot[0], 0, oldZ); MWMechanics::Movement *move = &ptr.getClass().getMovementSettings(ptr); move->mPosition[0] = direction.pos[0]; move->mPosition[1] = direction.pos[1]; move->mPosition[2] = direction.pos[2]; + + MWMechanics::zTurn(ptr, position.rot[2], osg::DegreesToRadians(1.0)); } void DedicatedPlayer::setAnimFlags()