Fixed ancestor ghost crash

actorid
Jason Hooks 13 years ago
parent eab69f18ac
commit 5e1cc07ee8

@ -408,7 +408,7 @@ namespace MWRender{
if(time < iter->getStartTime() || time < startTime || time > iter->getStopTime()) if(time < iter->getStartTime() || time < startTime || time > iter->getStopTime())
{ {
slot++; slot++;
iter++; //iter++;
continue; continue;
} }
@ -442,14 +442,13 @@ namespace MWRender{
t = (v1 + (v2 - v1) * x); t = (v1 + (v2 - v1) * x);
} }
bool bQuats = quats.size() > 0; bool bQuats = quats.size() > 0;
if(bQuats){ if(bQuats){
r = Ogre::Quaternion::Slerp(x2, quats[rindexI[slot]], quats[rindexJ], true); r = Ogre::Quaternion::Slerp(x2, quats[rindexI[slot]], quats[rindexJ], true);
//bone->setOrientation(r); //bone->setOrientation(r);
} }
skel = base->getSkeleton(); skel = base->getSkeleton();
if(skel->hasBone(iter->getBonename())){ if(skel->hasBone(iter->getBonename())){
Ogre::Bone* bone = skel->getBone(iter->getBonename()); Ogre::Bone* bone = skel->getBone(iter->getBonename());
if(bTrans) if(bTrans)
@ -485,4 +484,5 @@ namespace MWRender{
} }
} }
} }
} }

@ -45,7 +45,7 @@ void CreatureAnimation::runAnimation(float timepassed){
//Handle the shapes dependent on animation transforms //Handle the shapes dependent on animation transforms
time += timepassed; time += timepassed;
if(time > stopTime){ if(time >= stopTime){
animate--; animate--;
//std::cout << "Stopping the animation\n"; //std::cout << "Stopping the animation\n";
if(animate == 0) if(animate == 0)

Loading…
Cancel
Save