forked from mirror/openmw-tes3mp
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
This commit is contained in:
parent
87c54adb24
commit
a3c4000198
2 changed files with 3 additions and 3 deletions
|
@ -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…
Reference in a new issue