mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-28 14:53:58 +00:00
Merge remote-tracking branch 'torben/checkidlecomplete'
This commit is contained in:
commit
94474e8952
@ -112,6 +112,8 @@ namespace MWBase
|
|||||||
virtual void skipAnimation(const MWWorld::Ptr& ptr) = 0;
|
virtual void skipAnimation(const MWWorld::Ptr& ptr) = 0;
|
||||||
///< Skip the animation for the given MW-reference for one frame. Calls to this function for
|
///< 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.
|
/// 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())
|
if(iter != mActors.end())
|
||||||
iter->second.skipAnim();
|
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 playAnimationGroup(const MWWorld::Ptr& ptr, const std::string& groupName, int mode, int number);
|
||||||
void skipAnimation(const MWWorld::Ptr& ptr);
|
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;
|
mSkipAnim = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool CharacterController::isAnimPlaying(const std::string &groupName)
|
||||||
|
{
|
||||||
|
if(mAnimation == NULL)
|
||||||
|
return false;
|
||||||
|
else
|
||||||
|
return mAnimation->isPlaying(groupName);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void CharacterController::clearAnimQueue()
|
void CharacterController::clearAnimQueue()
|
||||||
{
|
{
|
||||||
|
@ -125,6 +125,7 @@ public:
|
|||||||
|
|
||||||
void playGroup(const std::string &groupname, int mode, int count);
|
void playGroup(const std::string &groupname, int mode, int count);
|
||||||
void skipAnim();
|
void skipAnim();
|
||||||
|
bool isAnimPlaying(const std::string &groupName);
|
||||||
|
|
||||||
void setState(CharacterState state);
|
void setState(CharacterState state);
|
||||||
CharacterState getState() const
|
CharacterState getState() const
|
||||||
|
@ -668,5 +668,12 @@ namespace MWMechanics
|
|||||||
else
|
else
|
||||||
mObjects.skipAnimation(ptr);
|
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 playAnimationGroup(const MWWorld::Ptr& ptr, const std::string& groupName, int mode, int number);
|
||||||
virtual void skipAnimation(const MWWorld::Ptr& ptr);
|
virtual void skipAnimation(const MWWorld::Ptr& ptr);
|
||||||
|
virtual bool checkAnimationPlaying(const MWWorld::Ptr& ptr, const std::string &groupName);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user