1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-22 07:23:52 +00:00

Don't try to move objects that aren't in a cell

This commit is contained in:
Chris Robinson 2013-01-06 23:20:20 -08:00
parent 921ae76ea9
commit 648e3331f5

View file

@ -98,6 +98,8 @@ void Animation::updatePosition(float time)
mAccumRoot->translate(-posdiff);
mLastPosition += posdiff;
if(mPtr.isInCell())
{
/* Finally, move the object based on how much the non-accumulation root moved. */
Ogre::Vector3 newpos(mPtr.getRefData().getPosition().pos);
newpos += mInsert->getOrientation() * posdiff;
@ -106,6 +108,7 @@ void Animation::updatePosition(float time)
world->moveObject(mPtr, newpos.x, newpos.y, newpos.z);
}
}
}
void Animation::resetPosition(float time)
{