mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-24 18:39:59 +00:00
If same area is defined in multiple plugin the last must wins
This commit is contained in:
parent
b1a3fc9399
commit
c98b0f713d
@ -431,7 +431,12 @@ namespace MWWorld
|
||||
land.load(esm, isDeleted);
|
||||
|
||||
// Same area defined in multiple plugins? -> last plugin wins
|
||||
mStatic.insert(std::move(land));
|
||||
auto [it, inserted] = mStatic.insert(std::move(land));
|
||||
if (!inserted) {
|
||||
auto nh = mStatic.extract(it);
|
||||
nh.value() = std::move(land);
|
||||
mStatic.insert(std::move(nh));
|
||||
}
|
||||
|
||||
return RecordId("", isDeleted);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user