moved call to Globalscripts::addStartup out of the constructor because at the time of construction the environment may not be set up yet to perform this operation

pull/193/head
Marc Zinnschlag 11 years ago
parent 87c54adb24
commit a3c4000198

@ -421,6 +421,8 @@ void OMW::Engine::prepareEngine (Settings::Manager & settings)
mOgre->getRoot()->addFrameListener (this);
// scripts
mEnvironment.getScriptManager()->getGlobalScripts().addStartup();
if (mCompileAll)
{
std::pair<int, int> result = MWBase::Environment::get().getScriptManager()->compileAll();

@ -20,9 +20,7 @@ namespace MWScript
GlobalScripts::GlobalScripts (const MWWorld::ESMStore& store)
: mStore (store)
{
addStartup();
}
{}
void GlobalScripts::addScript (const std::string& name, const std::string& targetId)
{

Loading…
Cancel
Save