mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 19:19:56 +00:00
fixed running global scripts a second time after they have been stopped
This commit is contained in:
parent
74793c1c2f
commit
2a35c7d33a
1 changed files with 8 additions and 1 deletions
|
@ -22,7 +22,11 @@ namespace MWScript
|
|||
|
||||
void GlobalScripts::addScript (const std::string& name)
|
||||
{
|
||||
if (mScripts.find (Misc::StringUtils::lowerCase (name))==mScripts.end())
|
||||
std::map<std::string, std::pair<bool, Locals> >::iterator iter =
|
||||
mScripts.find (Misc::StringUtils::lowerCase (name));
|
||||
|
||||
if (iter==mScripts.end())
|
||||
{
|
||||
if (const ESM::Script *script = mStore.get<ESM::Script>().find (name))
|
||||
{
|
||||
Locals locals;
|
||||
|
@ -31,6 +35,9 @@ namespace MWScript
|
|||
|
||||
mScripts.insert (std::make_pair (name, std::make_pair (true, locals)));
|
||||
}
|
||||
}
|
||||
else
|
||||
iter->second.first = true;
|
||||
}
|
||||
|
||||
void GlobalScripts::removeScript (const std::string& name)
|
||||
|
|
Loading…
Reference in a new issue