mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 19:19:56 +00:00
Merge remote-tracking branch 'torben/checkidlecomplete'
This commit is contained in:
commit
94474e8952
7 changed files with 28 additions and 0 deletions
|
@ -112,6 +112,8 @@ namespace MWBase
|
|||
virtual void skipAnimation(const MWWorld::Ptr& ptr) = 0;
|
||||
///< Skip the animation for the given MW-reference for one frame. Calls to this function for
|
||||
/// references that are currently not in the scene should be ignored.
|
||||
|
||||
virtual bool checkAnimationPlaying(const MWWorld::Ptr& ptr, const std::string& groupName) = 0;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -309,4 +309,12 @@ namespace MWMechanics
|
|||
if(iter != mActors.end())
|
||||
iter->second.skipAnim();
|
||||
}
|
||||
|
||||
bool Actors::checkAnimationPlaying(const MWWorld::Ptr& ptr, const std::string& groupName)
|
||||
{
|
||||
PtrControllerMap::iterator iter = mActors.find(ptr);
|
||||
if(iter != mActors.end())
|
||||
return iter->second.isAnimPlaying(groupName);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -82,6 +82,7 @@ namespace MWMechanics
|
|||
|
||||
void playAnimationGroup(const MWWorld::Ptr& ptr, const std::string& groupName, int mode, int number);
|
||||
void skipAnimation(const MWWorld::Ptr& ptr);
|
||||
bool checkAnimationPlaying(const MWWorld::Ptr& ptr, const std::string& groupName);
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -509,6 +509,14 @@ void CharacterController::skipAnim()
|
|||
mSkipAnim = true;
|
||||
}
|
||||
|
||||
bool CharacterController::isAnimPlaying(const std::string &groupName)
|
||||
{
|
||||
if(mAnimation == NULL)
|
||||
return false;
|
||||
else
|
||||
return mAnimation->isPlaying(groupName);
|
||||
}
|
||||
|
||||
|
||||
void CharacterController::clearAnimQueue()
|
||||
{
|
||||
|
|
|
@ -125,6 +125,7 @@ public:
|
|||
|
||||
void playGroup(const std::string &groupname, int mode, int count);
|
||||
void skipAnim();
|
||||
bool isAnimPlaying(const std::string &groupName);
|
||||
|
||||
void setState(CharacterState state);
|
||||
CharacterState getState() const
|
||||
|
|
|
@ -668,5 +668,12 @@ namespace MWMechanics
|
|||
else
|
||||
mObjects.skipAnimation(ptr);
|
||||
}
|
||||
bool MechanicsManager::checkAnimationPlaying(const MWWorld::Ptr& ptr, const std::string &groupName)
|
||||
{
|
||||
if(MWWorld::Class::get(ptr).isActor())
|
||||
return mActors.checkAnimationPlaying(ptr, groupName);
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -100,6 +100,7 @@ namespace MWMechanics
|
|||
|
||||
virtual void playAnimationGroup(const MWWorld::Ptr& ptr, const std::string& groupName, int mode, int number);
|
||||
virtual void skipAnimation(const MWWorld::Ptr& ptr);
|
||||
virtual bool checkAnimationPlaying(const MWWorld::Ptr& ptr, const std::string &groupName);
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue