forked from mirror/openmw-tes3mp
various Object class fixes
This commit is contained in:
parent
3541d03809
commit
c35b87de95
1 changed files with 4 additions and 8 deletions
|
@ -49,7 +49,7 @@ void CSVRender::Object::update()
|
||||||
error = 1;
|
error = 1;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// xxx check for Deleted state (error 1)
|
/// \todo check for Deleted state (error 1)
|
||||||
|
|
||||||
model = referenceables.getData (index,
|
model = referenceables.getData (index,
|
||||||
referenceables.findColumnIndex (CSMWorld::Columns::ColumnId_Model)).
|
referenceables.findColumnIndex (CSMWorld::Columns::ColumnId_Model)).
|
||||||
|
@ -81,19 +81,15 @@ void CSVRender::Object::adjust()
|
||||||
|
|
||||||
// position
|
// position
|
||||||
if (!mForceBaseToZero)
|
if (!mForceBaseToZero)
|
||||||
{
|
|
||||||
Ogre::Vector3 (reference.mPos.pos[0], reference.mPos.pos[1], reference.mPos.pos[2]);
|
|
||||||
|
|
||||||
mBase->setPosition (Ogre::Vector3 (
|
mBase->setPosition (Ogre::Vector3 (
|
||||||
reference.mPos.pos[0], reference.mPos.pos[1], reference.mPos.pos[2]));
|
reference.mPos.pos[0], reference.mPos.pos[1], reference.mPos.pos[2]));
|
||||||
}
|
|
||||||
|
|
||||||
// orientation
|
// orientation
|
||||||
Ogre::Quaternion xr (Ogre::Radian (-reference.mPos.pos[0]), Ogre::Vector3::UNIT_X);
|
Ogre::Quaternion xr (Ogre::Radian (-reference.mPos.rot[0]), Ogre::Vector3::UNIT_X);
|
||||||
|
|
||||||
Ogre::Quaternion yr (Ogre::Radian (-reference.mPos.pos[1]), Ogre::Vector3::UNIT_Y);
|
Ogre::Quaternion yr (Ogre::Radian (-reference.mPos.rot[1]), Ogre::Vector3::UNIT_Y);
|
||||||
|
|
||||||
Ogre::Quaternion zr (Ogre::Radian (-reference.mPos.pos[2]), Ogre::Vector3::UNIT_Z);
|
Ogre::Quaternion zr (Ogre::Radian (-reference.mPos.rot[2]), Ogre::Vector3::UNIT_Z);
|
||||||
|
|
||||||
mBase->setOrientation (xr*yr*zr);
|
mBase->setOrientation (xr*yr*zr);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue