forked from teamnwah/openmw-tes3coop
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);
|
mOgre->getRoot()->addFrameListener (this);
|
||||||
|
|
||||||
// scripts
|
// scripts
|
||||||
|
mEnvironment.getScriptManager()->getGlobalScripts().addStartup();
|
||||||
|
|
||||||
if (mCompileAll)
|
if (mCompileAll)
|
||||||
{
|
{
|
||||||
std::pair<int, int> result = MWBase::Environment::get().getScriptManager()->compileAll();
|
std::pair<int, int> result = MWBase::Environment::get().getScriptManager()->compileAll();
|
||||||
|
|
|
@ -20,9 +20,7 @@ namespace MWScript
|
||||||
|
|
||||||
GlobalScripts::GlobalScripts (const MWWorld::ESMStore& store)
|
GlobalScripts::GlobalScripts (const MWWorld::ESMStore& store)
|
||||||
: mStore (store)
|
: mStore (store)
|
||||||
{
|
{}
|
||||||
addStartup();
|
|
||||||
}
|
|
||||||
|
|
||||||
void GlobalScripts::addScript (const std::string& name, const std::string& targetId)
|
void GlobalScripts::addScript (const std::string& name, const std::string& targetId)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue