mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-05 19:19:44 +00:00
Super smooth animations; 100 PERCENT COMPLETE
This commit is contained in:
parent
f21df64808
commit
4a219404fc
1 changed files with 10 additions and 7 deletions
|
@ -284,19 +284,13 @@ void loadResource(Ogre::Resource *resource)
|
|||
//Get latest time
|
||||
if(quatiter != quatkeys.mKeys.end()){
|
||||
curtime = std::min(curtime, quatiter->mTime);
|
||||
lastquat = curquat;
|
||||
curquat = startquat.Inverse() * quatiter->mValue ;
|
||||
|
||||
}
|
||||
if(traniter != trankeys.mKeys.end()){
|
||||
curtime = std::min(curtime, traniter->mTime);
|
||||
lasttrans = curtrans;
|
||||
curtrans = traniter->mValue - starttrans;
|
||||
|
||||
}
|
||||
if(scaleiter != scalekeys.mKeys.end()){
|
||||
curtime = std::min(curtime, scaleiter->mTime);
|
||||
lastscale = curscale;
|
||||
curscale = Ogre::Vector3(scaleiter->mValue) / startscale;
|
||||
}
|
||||
|
||||
curtime = std::max(curtime, kfc->timeStart);
|
||||
|
@ -342,14 +336,23 @@ void loadResource(Ogre::Resource *resource)
|
|||
while(quatiter != quatkeys.mKeys.end() && curtime >= quatiter->mTime)
|
||||
{
|
||||
quatiter++;
|
||||
lastquat = curquat;
|
||||
if(quatiter != quatkeys.mKeys.end())
|
||||
curquat = startquat.Inverse() * quatiter->mValue ;
|
||||
}
|
||||
while(traniter != trankeys.mKeys.end() && curtime >= traniter->mTime)
|
||||
{
|
||||
traniter++;
|
||||
lasttrans = curtrans;
|
||||
if(traniter != trankeys.mKeys.end())
|
||||
curtrans = traniter->mValue - starttrans;
|
||||
}
|
||||
while(scaleiter != scalekeys.mKeys.end() && curtime >= scaleiter->mTime)
|
||||
{
|
||||
scaleiter++;
|
||||
lastscale = curscale;
|
||||
if(scaleiter != scalekeys.mKeys.end())
|
||||
curscale = Ogre::Vector3(scaleiter->mValue) / startscale;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue