1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-19 21:23:52 +00:00

Don't create physics before we have initialized ogre

This commit is contained in:
Jan-Peter Nilsson 2011-02-27 00:50:08 +01:00
parent 26b780d1ac
commit 1ce77229c0

View file

@ -203,9 +203,9 @@ OMW::Engine::Engine()
, mScriptManager (0) , mScriptManager (0)
, mScriptContext (0) , mScriptContext (0)
, mGuiManager (0) , mGuiManager (0)
, mPhysicEngine (0)
{ {
MWClass::registerClasses(); MWClass::registerClasses();
mPhysicEngine = new OEngine::Physic::PhysicEngine();
} }
OMW::Engine::~Engine() OMW::Engine::~Engine()
@ -339,9 +339,13 @@ void OMW::Engine::go()
loadBSA(); loadBSA();
// Create physics
mPhysicEngine = new OEngine::Physic::PhysicEngine();
// 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);
// Set up the GUI system // Set up the GUI system
mGuiManager = new OEngine::GUI::MyGUIManager(mOgre.getWindow(), mOgre.getScene(), false, cfgDir); mGuiManager = new OEngine::GUI::MyGUIManager(mOgre.getWindow(), mOgre.getScene(), false, cfgDir);
MyGUI::FactoryManager::getInstance().registerFactory<MWGui::Widgets::MWSkill>("Widget"); MyGUI::FactoryManager::getInstance().registerFactory<MWGui::Widgets::MWSkill>("Widget");