mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-09-17 00:22:24 -04:00
Add a method to update an Animation's Ptr object
This commit is contained in:
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…
x
Reference in New Issue
Block a user