1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-30 22:15:32 +00:00

Fix bug with loop key assignment

Animations with time of "loop start" == time of "loop stop" were not getting their loop times assigned correctly.

This fixes incorrect playing of the jump animation, one aspect of Bug #2286.
This commit is contained in:
scrawl 2015-07-16 19:55:05 +02:00
parent 17ada63fcb
commit f6f82d433c

View file

@ -598,9 +598,7 @@ namespace MWRender
state.setTime(state.mStartTime + ((state.mStopTime - state.mStartTime) * startpoint));
// mLoopStartTime and mLoopStopTime normally get assigned when encountering these keys while playing the animation
// (see handleTextKey). But if startpoint is already past these keys, we need to assign them now.
if(state.getTime() > state.mStartTime)
{
// (see handleTextKey). But if startpoint is already past these keys, or start time is == stop time, we need to assign them now.
const std::string loopstarttag = groupname+": loop start";
const std::string loopstoptag = groupname+": loop stop";
@ -615,7 +613,6 @@ namespace MWRender
else if (key->second == loopstoptag)
state.mLoopStopTime = key->first;
}
}
return true;
}