mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 21:23:52 +00:00
fix rotation for objects in inactive cells and forced vanity mode
This commit is contained in:
parent
88e8659a49
commit
661fd73c6e
1 changed files with 8 additions and 8 deletions
|
@ -832,16 +832,16 @@ namespace MWWorld
|
|||
rot.y = Ogre::Degree(y).valueRadians();
|
||||
rot.z = Ogre::Degree(z).valueRadians();
|
||||
|
||||
float *objRot = ptr.getRefData().getPosition().rot;
|
||||
if(ptr.getRefData().getBaseNode() == 0 || !mRendering->rotateObject(ptr, rot, adjust))
|
||||
if (mRendering->rotateObject(ptr, rot, adjust))
|
||||
{
|
||||
objRot[0] = (adjust ? objRot[0] + rot.x : rot.x), objRot[1] = (adjust ? objRot[1] + rot.y : rot.y), objRot[2] = (adjust ? objRot[2] + rot.z : rot.z);
|
||||
return;
|
||||
}
|
||||
// rotate physically iff renderer confirm so
|
||||
float *objRot = ptr.getRefData().getPosition().rot;
|
||||
objRot[0] = rot.x, objRot[1] = rot.y, objRot[2] = rot.z;
|
||||
|
||||
// do this after rendering rotated the object so it gets changed by Class->adjustRotation
|
||||
objRot[0] = rot.x, objRot[1] = rot.y, objRot[2] = rot.z;
|
||||
mPhysics->rotateObject(ptr);
|
||||
if (ptr.getRefData().getBaseNode() != 0) {
|
||||
mPhysics->rotateObject(ptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void World::safePlaceObject(const MWWorld::Ptr& ptr,MWWorld::CellStore &Cell,ESM::Position pos)
|
||||
|
|
Loading…
Reference in a new issue