mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-29 22:20:33 +00:00
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
@ -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…
x
Reference in New Issue
Block a user