mirror of
https://github.com/OpenMW/openmw.git
synced 2025-04-01 21:06:41 +00:00
Based on the reason for closing !1845, we *should* let a scripted animation get stuck forever if the animation was already playing.
This commit is contained in:
parent
cf5b782c76
commit
70f41b22b6
3 changed files with 1 additions and 18 deletions
|
@ -1855,13 +1855,7 @@ namespace MWMechanics
|
|||
if (mAnimQueue.empty())
|
||||
return;
|
||||
|
||||
bool isFrontAnimPlaying = false;
|
||||
if (mAnimQueue.front().mScripted)
|
||||
isFrontAnimPlaying = mAnimation->isPlayingScripted(mAnimQueue.front().mGroup);
|
||||
else
|
||||
isFrontAnimPlaying = mAnimation->isPlaying(mAnimQueue.front().mGroup);
|
||||
|
||||
if (!isFrontAnimPlaying)
|
||||
if (!mAnimation->isPlaying(mAnimQueue.front().mGroup))
|
||||
{
|
||||
if (mAnimQueue.size() > 1)
|
||||
{
|
||||
|
|
|
@ -1020,14 +1020,6 @@ namespace MWRender
|
|||
return false;
|
||||
}
|
||||
|
||||
bool Animation::isPlayingScripted(std::string_view groupname) const
|
||||
{
|
||||
AnimStateMap::const_iterator state(mStates.find(groupname));
|
||||
if (state != mStates.end())
|
||||
return state->second.mPlaying && state->second.mPriority.contains(MWMechanics::Priority::Priority_Scripted);
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Animation::getInfo(std::string_view groupname, float* complete, float* speedmult) const
|
||||
{
|
||||
AnimStateMap::const_iterator iter = mStates.find(groupname);
|
||||
|
|
|
@ -432,9 +432,6 @@ namespace MWRender
|
|||
/** Returns true if the named animation group is playing. */
|
||||
bool isPlaying(std::string_view groupname) const;
|
||||
|
||||
/** Returns true if the named, scripted animation group is playing. */
|
||||
bool isPlayingScripted(std::string_view groupname) const;
|
||||
|
||||
/// Returns true if no important animations are currently playing on the upper body.
|
||||
bool upperBodyReady() const;
|
||||
|
||||
|
|
Loading…
Reference in a new issue