forked from teamnwah/openmw-tes3coop
[Client] Play rotation animation on dedicated players
This commit is contained in:
parent
ae9e5750ac
commit
d67db1a9bd
1 changed files with 5 additions and 1 deletions
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
#include <boost/algorithm/clamp.hpp>
|
#include <boost/algorithm/clamp.hpp>
|
||||||
#include <components/openmw-mp/Log.hpp>
|
#include <components/openmw-mp/Log.hpp>
|
||||||
|
#include <apps/openmw/mwmechanics/steering.hpp>
|
||||||
|
|
||||||
#include "../mwbase/environment.hpp"
|
#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->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);
|
MWMechanics::Movement *move = &ptr.getClass().getMovementSettings(ptr);
|
||||||
move->mPosition[0] = direction.pos[0];
|
move->mPosition[0] = direction.pos[0];
|
||||||
move->mPosition[1] = direction.pos[1];
|
move->mPosition[1] = direction.pos[1];
|
||||||
move->mPosition[2] = direction.pos[2];
|
move->mPosition[2] = direction.pos[2];
|
||||||
|
|
||||||
|
MWMechanics::zTurn(ptr, position.rot[2], osg::DegreesToRadians(1.0));
|
||||||
}
|
}
|
||||||
|
|
||||||
void DedicatedPlayer::setAnimFlags()
|
void DedicatedPlayer::setAnimFlags()
|
||||||
|
|
Loading…
Reference in a new issue