Add a method to update an Animation's Ptr object

actorid
Chris Robinson 12 years ago
parent a2eaec7878
commit d208422ca7

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

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

@ -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

Loading…
Cancel
Save