1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-03-29 16:06:44 +00:00

Merge remote branch 'upstream/collision' into collision

This commit is contained in:
gugus 2011-03-22 14:14:56 +01:00
commit 0cc94c81d4
2 changed files with 12 additions and 8 deletions

View file

@ -166,12 +166,16 @@ void MWScene::moveObject (const std::string& handle, const Ogre::Vector3& positi
if(updatePhysics)//TODO: is it an actor? if(updatePhysics)//TODO: is it an actor?
{ {
OEngine::Physic::RigidBody* body = eng->getRigidBody(handle); if (OEngine::Physic::RigidBody* body = eng->getRigidBody(handle))
{
// TODO very dirty hack to avoid crash during setup -> needs cleaning up to allow
// start positions others than 0, 0, 0
btTransform tr = body->getWorldTransform(); btTransform tr = body->getWorldTransform();
tr.setOrigin(btVector3(position.x,position.y,position.z)); tr.setOrigin(btVector3(position.x,position.y,position.z));
body->setWorldTransform(tr); body->setWorldTransform(tr);
} }
} }
}
void MWScene::rotateObject (const std::string& handle, const Ogre::Quaternion& rotation) void MWScene::rotateObject (const std::string& handle, const Ogre::Quaternion& rotation)
{ {

View file

@ -18,7 +18,7 @@ namespace MWWorld
bool DoingPhysics::isDoingPhysics() bool DoingPhysics::isDoingPhysics()
{ {
return sCounter>0 || sSuppress>0; return sCounter>0 && sSuppress==0;
} }
SuppressDoingPhysics::SuppressDoingPhysics() SuppressDoingPhysics::SuppressDoingPhysics()