mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-04 06:15:34 +00:00
Not sure about this commit: the PhysicEngine was initialized twice...
This commit is contained in:
parent
9d4cda6510
commit
2aee958789
2 changed files with 6 additions and 4 deletions
|
@ -49,6 +49,7 @@
|
|||
#include "mwgui/class.hpp"
|
||||
#include "path.hpp"
|
||||
|
||||
#include "components/nifbullet/bullet_nif_loader.hpp"
|
||||
|
||||
//using namespace ESM;
|
||||
|
||||
|
@ -351,8 +352,9 @@ void OMW::Engine::go()
|
|||
|
||||
loadBSA();
|
||||
|
||||
// Create physics
|
||||
mPhysicEngine = new OEngine::Physic::PhysicEngine();
|
||||
// Create physics. shapeLoader is deleted by the physic engine
|
||||
ManualBulletShapeLoader* shapeLoader = new ManualBulletShapeLoader();
|
||||
mPhysicEngine = new OEngine::Physic::PhysicEngine(shapeLoader);
|
||||
|
||||
// Create the world
|
||||
mEnvironment.mWorld = new MWWorld::World (mOgre, mPhysicEngine, mDataDir, mMaster, mResDir, mNewGame, mEnvironment);
|
||||
|
|
|
@ -438,7 +438,7 @@ namespace MWWorld
|
|||
mSkyManager =
|
||||
MWRender::SkyManager::create(renderer.getWindow(), mScene.getCamera(), resDir);
|
||||
|
||||
mPhysEngine = new OEngine::Physic::PhysicEngine();
|
||||
mPhysEngine = physEng;
|
||||
}
|
||||
|
||||
World::~World()
|
||||
|
@ -455,7 +455,7 @@ namespace MWWorld
|
|||
delete mSkyManager;
|
||||
delete mGlobalVariables;
|
||||
|
||||
delete mPhysEngine;
|
||||
//delete mPhysEngine;
|
||||
}
|
||||
|
||||
MWWorld::Player& World::getPlayer()
|
||||
|
|
Loading…
Reference in a new issue