mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-14 01:19:59 +00:00
Not sure about this commit: the PhysicEngine was initialized twice...
This commit is contained in:
parent
9d4cda6510
commit
2aee958789
@ -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…
x
Reference in New Issue
Block a user