mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-20 15:40:32 +00:00
Simplify condition
This commit is contained in:
parent
bf9dc45b2b
commit
6450c9be27
@ -1533,8 +1533,8 @@ void CharacterController::update(float duration)
|
||||
|
||||
updateMagicEffects();
|
||||
|
||||
if(mAnimQueue.size() > 1 && (mAnimation->getLoopingEnabled(mAnimQueue.front().mGroup) == true))
|
||||
mAnimation->setLoopingEnabled(mAnimQueue.front().mGroup, false);
|
||||
if(!mAnimQueue.empty())
|
||||
mAnimation->setLoopingEnabled(mAnimQueue.front().mGroup, mAnimQueue.size() <= 1);
|
||||
|
||||
if(!cls.isActor())
|
||||
{
|
||||
|
@ -1106,14 +1106,6 @@ namespace MWRender
|
||||
state->second.mLoopingEnabled = enabled;
|
||||
}
|
||||
|
||||
bool Animation::getLoopingEnabled(const std::string &groupname) const
|
||||
{
|
||||
AnimStateMap::const_iterator state(mStates.find(groupname));
|
||||
if(state != mStates.end())
|
||||
return state->second.mLoopingEnabled;
|
||||
return false;
|
||||
}
|
||||
|
||||
void Animation::setObjectRoot(const std::string &model, bool forceskeleton, bool baseonly, bool isCreature)
|
||||
{
|
||||
osg::ref_ptr<osg::StateSet> previousStateset;
|
||||
|
@ -435,8 +435,6 @@ public:
|
||||
|
||||
void setLoopingEnabled(const std::string &groupname, bool enabled);
|
||||
|
||||
bool getLoopingEnabled(const std::string &groupname) const;
|
||||
|
||||
/// This is typically called as part of runAnimation, but may be called manually if needed.
|
||||
void updateEffects(float duration);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user