Not sure about this commit: the PhysicEngine was initialized twice...

actorid
gugus 14 years ago
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…
Cancel
Save