mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-24 00:39:49 +00:00
Fix overwriting script records not working
This commit is contained in:
parent
d1b5956a98
commit
bd0a0e64a9
@ -360,6 +360,8 @@ namespace MWWorld
|
|||||||
std::pair<typename Static::iterator, bool> inserted = mStatic.insert(std::make_pair(scpt.mId, scpt));
|
std::pair<typename Static::iterator, bool> inserted = mStatic.insert(std::make_pair(scpt.mId, scpt));
|
||||||
if (inserted.second)
|
if (inserted.second)
|
||||||
mShared.push_back(&inserted.first->second);
|
mShared.push_back(&inserted.first->second);
|
||||||
|
else
|
||||||
|
inserted.first->second = scpt;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
@ -371,6 +373,8 @@ namespace MWWorld
|
|||||||
std::pair<typename Static::iterator, bool> inserted = mStatic.insert(std::make_pair(s.mId, s));
|
std::pair<typename Static::iterator, bool> inserted = mStatic.insert(std::make_pair(s.mId, s));
|
||||||
if (inserted.second)
|
if (inserted.second)
|
||||||
mShared.push_back(&inserted.first->second);
|
mShared.push_back(&inserted.first->second);
|
||||||
|
else
|
||||||
|
inserted.first->second = s;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user