From 4191bb32d1a17829180d75d94ef81ae1c1453af0 Mon Sep 17 00:00:00 2001 From: Marc Zinnschlag Date: Mon, 22 Aug 2011 21:34:51 +0200 Subject: [PATCH] fixed an unitialised variable --- apps/openmw/mwworld/physicssystem.cpp | 12 ++++++------ apps/openmw/mwworld/physicssystem.hpp | 22 ++++++++++++---------- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/apps/openmw/mwworld/physicssystem.cpp b/apps/openmw/mwworld/physicssystem.cpp index e9a270c538..f4433af8ee 100644 --- a/apps/openmw/mwworld/physicssystem.cpp +++ b/apps/openmw/mwworld/physicssystem.cpp @@ -15,16 +15,16 @@ namespace MWWorld { PhysicsSystem::PhysicsSystem(OEngine::Render::OgreRenderer &_rend , OEngine::Physic::PhysicEngine* physEng) : - mRender(_rend), mEngine(physEng) + mRender(_rend), mEngine(physEng), mFreeFly (true) { - + } - + PhysicsSystem::~PhysicsSystem() { - + } - + std::vector< std::pair > PhysicsSystem::doPhysics (float duration, const std::vector >& actors) { @@ -76,7 +76,7 @@ namespace MWWorld { btVector3 newPos = it->second->getPosition(); Ogre::Vector3 coord(newPos.x(), newPos.y(), newPos.z()); - + response.push_back(std::pair(it->first, coord)); } return response; diff --git a/apps/openmw/mwworld/physicssystem.hpp b/apps/openmw/mwworld/physicssystem.hpp index 57e3f363d2..4fbbb2ee61 100644 --- a/apps/openmw/mwworld/physicssystem.hpp +++ b/apps/openmw/mwworld/physicssystem.hpp @@ -13,31 +13,33 @@ namespace MWWorld public: PhysicsSystem (OEngine::Render::OgreRenderer &_rend , OEngine::Physic::PhysicEngine* physEng); ~PhysicsSystem (); - + std::vector< std::pair > doPhysics (float duration, const std::vector >& actors); - + void addObject (const std::string& handle, const std::string& mesh, const Ogre::Quaternion& rotation, float scale, const Ogre::Vector3& position); - + void addActor (const std::string& handle, const std::string& mesh, const Ogre::Vector3& position); - + void removeObject (const std::string& handle); - + void moveObject (const std::string& handle, const Ogre::Vector3& position, bool updatePhysics); - + void rotateObject (const std::string& handle, const Ogre::Quaternion& rotation); - + void scaleObject (const std::string& handle, float scale); - + bool toggleCollisionMode(); - + private: OEngine::Render::OgreRenderer &mRender; OEngine::Physic::PhysicEngine* mEngine; bool mFreeFly; - + + PhysicsSystem (const PhysicsSystem&); + PhysicsSystem& operator= (const PhysicsSystem&); }; }