1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-21 10:53:53 +00:00

Add a method to update an Animation's Ptr object

This commit is contained in:
Chris Robinson 2013-02-23 10:12:36 -08:00
parent a2eaec7878
commit d208422ca7
3 changed files with 8 additions and 1 deletions

View file

@ -169,6 +169,7 @@ void Actors::updateObjectCell(const MWWorld::Ptr &ptr)
{
Animation *anim = iter->second;
mAllActors.erase(iter);
anim->updatePtr(ptr);
mAllActors[ptr] = anim;
}
}

View file

@ -169,6 +169,11 @@ void Animation::setLooping(bool loop)
mLooping = loop;
}
void Animation::updatePtr(const MWWorld::Ptr &ptr)
{
mPtr = ptr;
}
void Animation::calcAnimVelocity()
{

View file

@ -49,7 +49,6 @@ protected:
* bone names) are positioned identically. */
void updateSkeletonInstance(const Ogre::SkeletonInstance *skelsrc, Ogre::SkeletonInstance *skel);
/* Updates the animation to the specified time, and returns the movement
* vector since the last update or reset. */
Ogre::Vector3 updatePosition(float time);
@ -78,6 +77,8 @@ public:
void setController(MWMechanics::CharacterController *controller);
void updatePtr(const MWWorld::Ptr &ptr);
bool hasAnimation(const std::string &anim);
// Specifies the axis' to accumulate on. Non-accumulated axis will just