mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-30 08:35:52 -04:00
Super smooth animations; 100 PERCENT COMPLETE
This commit is contained in:
parent
f21df64808
commit
4a219404fc
@ -284,19 +284,13 @@ void loadResource(Ogre::Resource *resource)
|
|||||||
//Get latest time
|
//Get latest time
|
||||||
if(quatiter != quatkeys.mKeys.end()){
|
if(quatiter != quatkeys.mKeys.end()){
|
||||||
curtime = std::min(curtime, quatiter->mTime);
|
curtime = std::min(curtime, quatiter->mTime);
|
||||||
lastquat = curquat;
|
|
||||||
curquat = startquat.Inverse() * quatiter->mValue ;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
if(traniter != trankeys.mKeys.end()){
|
if(traniter != trankeys.mKeys.end()){
|
||||||
curtime = std::min(curtime, traniter->mTime);
|
curtime = std::min(curtime, traniter->mTime);
|
||||||
lasttrans = curtrans;
|
|
||||||
curtrans = traniter->mValue - starttrans;
|
|
||||||
}
|
}
|
||||||
if(scaleiter != scalekeys.mKeys.end()){
|
if(scaleiter != scalekeys.mKeys.end()){
|
||||||
curtime = std::min(curtime, scaleiter->mTime);
|
curtime = std::min(curtime, scaleiter->mTime);
|
||||||
lastscale = curscale;
|
|
||||||
curscale = Ogre::Vector3(scaleiter->mValue) / startscale;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
curtime = std::max(curtime, kfc->timeStart);
|
curtime = std::max(curtime, kfc->timeStart);
|
||||||
@ -342,14 +336,23 @@ void loadResource(Ogre::Resource *resource)
|
|||||||
while(quatiter != quatkeys.mKeys.end() && curtime >= quatiter->mTime)
|
while(quatiter != quatkeys.mKeys.end() && curtime >= quatiter->mTime)
|
||||||
{
|
{
|
||||||
quatiter++;
|
quatiter++;
|
||||||
|
lastquat = curquat;
|
||||||
|
if(quatiter != quatkeys.mKeys.end())
|
||||||
|
curquat = startquat.Inverse() * quatiter->mValue ;
|
||||||
}
|
}
|
||||||
while(traniter != trankeys.mKeys.end() && curtime >= traniter->mTime)
|
while(traniter != trankeys.mKeys.end() && curtime >= traniter->mTime)
|
||||||
{
|
{
|
||||||
traniter++;
|
traniter++;
|
||||||
|
lasttrans = curtrans;
|
||||||
|
if(traniter != trankeys.mKeys.end())
|
||||||
|
curtrans = traniter->mValue - starttrans;
|
||||||
}
|
}
|
||||||
while(scaleiter != scalekeys.mKeys.end() && curtime >= scaleiter->mTime)
|
while(scaleiter != scalekeys.mKeys.end() && curtime >= scaleiter->mTime)
|
||||||
{
|
{
|
||||||
scaleiter++;
|
scaleiter++;
|
||||||
|
lastscale = curscale;
|
||||||
|
if(scaleiter != scalekeys.mKeys.end())
|
||||||
|
curscale = Ogre::Vector3(scaleiter->mValue) / startscale;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user