mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-03 22:19:40 +00:00
Fix looping anims that dont have "loop start"
This commit is contained in:
parent
bf0ae3ae72
commit
af2a38db38
1 changed files with 9 additions and 1 deletions
|
@ -307,7 +307,15 @@ void Animation::reset(const std::string &start, const std::string &stop)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mNextKey = mCurrentKeys->begin();
|
mNextKey = mCurrentKeys->begin();
|
||||||
mCurrentTime = 0.0f;
|
while(mNextKey != mCurrentKeys->end() && mNextKey->second != "start")
|
||||||
|
mNextKey++;
|
||||||
|
if(mNextKey != mCurrentKeys->end())
|
||||||
|
mCurrentTime = mNextKey->first;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mNextKey = mCurrentKeys->begin();
|
||||||
|
mCurrentTime = 0.0f;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(stop.length() > 0)
|
if(stop.length() > 0)
|
||||||
|
|
Loading…
Reference in a new issue