mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-04 06:45:35 +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 "mwgui/class.hpp"
|
||||||
#include "path.hpp"
|
#include "path.hpp"
|
||||||
|
|
||||||
|
#include "components/nifbullet/bullet_nif_loader.hpp"
|
||||||
|
|
||||||
//using namespace ESM;
|
//using namespace ESM;
|
||||||
|
|
||||||
|
@ -351,8 +352,9 @@ void OMW::Engine::go()
|
||||||
|
|
||||||
loadBSA();
|
loadBSA();
|
||||||
|
|
||||||
// Create physics
|
// Create physics. shapeLoader is deleted by the physic engine
|
||||||
mPhysicEngine = new OEngine::Physic::PhysicEngine();
|
ManualBulletShapeLoader* shapeLoader = new ManualBulletShapeLoader();
|
||||||
|
mPhysicEngine = new OEngine::Physic::PhysicEngine(shapeLoader);
|
||||||
|
|
||||||
// Create the world
|
// Create the world
|
||||||
mEnvironment.mWorld = new MWWorld::World (mOgre, mPhysicEngine, mDataDir, mMaster, mResDir, mNewGame, mEnvironment);
|
mEnvironment.mWorld = new MWWorld::World (mOgre, mPhysicEngine, mDataDir, mMaster, mResDir, mNewGame, mEnvironment);
|
||||||
|
|
|
@ -438,7 +438,7 @@ namespace MWWorld
|
||||||
mSkyManager =
|
mSkyManager =
|
||||||
MWRender::SkyManager::create(renderer.getWindow(), mScene.getCamera(), resDir);
|
MWRender::SkyManager::create(renderer.getWindow(), mScene.getCamera(), resDir);
|
||||||
|
|
||||||
mPhysEngine = new OEngine::Physic::PhysicEngine();
|
mPhysEngine = physEng;
|
||||||
}
|
}
|
||||||
|
|
||||||
World::~World()
|
World::~World()
|
||||||
|
@ -455,7 +455,7 @@ namespace MWWorld
|
||||||
delete mSkyManager;
|
delete mSkyManager;
|
||||||
delete mGlobalVariables;
|
delete mGlobalVariables;
|
||||||
|
|
||||||
delete mPhysEngine;
|
//delete mPhysEngine;
|
||||||
}
|
}
|
||||||
|
|
||||||
MWWorld::Player& World::getPlayer()
|
MWWorld::Player& World::getPlayer()
|
||||||
|
|
Loading…
Reference in a new issue