|
|
|
@ -1123,6 +1123,9 @@ namespace MWWorld
|
|
|
|
|
|
|
|
|
|
ptr.getRefData().setPosition(pos);
|
|
|
|
|
|
|
|
|
|
if(ptr.getRefData().getBaseNode() == 0)
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
if (ptr.getClass().isActor())
|
|
|
|
|
mWorldScene->updateObjectRotation(ptr);
|
|
|
|
|
else
|
|
|
|
@ -1131,19 +1134,19 @@ namespace MWWorld
|
|
|
|
|
|
|
|
|
|
void World::localRotateObject (const Ptr& ptr, float x, float y, float z)
|
|
|
|
|
{
|
|
|
|
|
if (ptr.getRefData().getBaseNode() != 0)
|
|
|
|
|
{
|
|
|
|
|
LocalRotation rot = ptr.getRefData().getLocalRotation();
|
|
|
|
|
rot.rot[0]=Ogre::Degree(x).valueRadians();
|
|
|
|
|
rot.rot[1]=Ogre::Degree(y).valueRadians();
|
|
|
|
|
rot.rot[2]=Ogre::Degree(z).valueRadians();
|
|
|
|
|
LocalRotation rot = ptr.getRefData().getLocalRotation();
|
|
|
|
|
rot.rot[0]=Ogre::Degree(x).valueRadians();
|
|
|
|
|
rot.rot[1]=Ogre::Degree(y).valueRadians();
|
|
|
|
|
rot.rot[2]=Ogre::Degree(z).valueRadians();
|
|
|
|
|
|
|
|
|
|
wrap(rot.rot[0]);
|
|
|
|
|
wrap(rot.rot[1]);
|
|
|
|
|
wrap(rot.rot[2]);
|
|
|
|
|
wrap(rot.rot[0]);
|
|
|
|
|
wrap(rot.rot[1]);
|
|
|
|
|
wrap(rot.rot[2]);
|
|
|
|
|
|
|
|
|
|
ptr.getRefData().setLocalRotation(rot);
|
|
|
|
|
ptr.getRefData().setLocalRotation(rot);
|
|
|
|
|
|
|
|
|
|
if (ptr.getRefData().getBaseNode() != 0)
|
|
|
|
|
{
|
|
|
|
|
mWorldScene->updateObjectLocalRotation(ptr);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -1983,11 +1986,12 @@ namespace MWWorld
|
|
|
|
|
mDoorStates[door] = state;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void World::activateDoor(const Ptr &door, bool open)
|
|
|
|
|
void World::activateDoor(const Ptr &door, int state)
|
|
|
|
|
{
|
|
|
|
|
int state = open ? 1 : 2;
|
|
|
|
|
door.getClass().setDoorState(door, state);
|
|
|
|
|
mDoorStates[door] = state;
|
|
|
|
|
if (state == 0)
|
|
|
|
|
mDoorStates.erase(door);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool World::getPlayerStandingOn (const MWWorld::Ptr& object)
|
|
|
|
|