forked from mirror/openmw-tes3mp
Fix 32bit Windows non-debug build with MSVC 11.0 crash during startup.
This commit is contained in:
parent
56ae85df0c
commit
5c11a94511
2 changed files with 4 additions and 4 deletions
|
@ -23,7 +23,7 @@ namespace Physic
|
|||
mBody = mEngine->createAndAdjustRigidBody(mMesh, mName, scale, position, rotation, &mBoxScaledTranslation, &mBoxRotation);
|
||||
mRaycastingBody = mEngine->createAndAdjustRigidBody(mMesh, mName, scale, position, rotation, &mBoxScaledTranslation, &mBoxRotation, true);
|
||||
Ogre::Quaternion inverse = mBoxRotation.Inverse();
|
||||
mBoxRotationInverse = btQuaternion(inverse.x, inverse.y, inverse.z,inverse.w);
|
||||
mBoxRotationInverse = Ogre::Quaternion(inverse.w, inverse.x, inverse.y,inverse.z);
|
||||
mEngine->addRigidBody(mBody, false, mRaycastingBody,true); //Add rigid body to dynamics world, but do not add to object map
|
||||
}
|
||||
|
||||
|
@ -85,8 +85,8 @@ namespace Physic
|
|||
Ogre::Quaternion PhysicActor::getRotation()
|
||||
{
|
||||
assert(mBody);
|
||||
btQuaternion quat = mBody->getWorldTransform().getRotation() * mBoxRotationInverse;
|
||||
return Ogre::Quaternion(quat.getW(), quat.getX(), quat.getY(), quat.getZ());
|
||||
btQuaternion quat = mBody->getWorldTransform().getRotation();
|
||||
return Ogre::Quaternion(quat.getW(), quat.getX(), quat.getY(), quat.getZ()) * mBoxRotationInverse;
|
||||
}
|
||||
|
||||
void PhysicActor::setScale(float scale){
|
||||
|
|
|
@ -162,7 +162,7 @@ namespace Physic
|
|||
|
||||
Ogre::Vector3 mBoxScaledTranslation;
|
||||
Ogre::Quaternion mBoxRotation;
|
||||
btQuaternion mBoxRotationInverse;
|
||||
Ogre::Quaternion mBoxRotationInverse;
|
||||
|
||||
Ogre::Vector3 mForce;
|
||||
bool mOnGround;
|
||||
|
|
Loading…
Reference in a new issue