mirror of
https://github.com/OpenMW/openmw.git
synced 2025-06-19 17:41:33 +00:00
If same area is defined in multiple plugin the last must wins
This commit is contained in:
parent
b1a3fc9399
commit
c98b0f713d
1 changed files with 6 additions and 1 deletions
|
@ -431,7 +431,12 @@ namespace MWWorld
|
||||||
land.load(esm, isDeleted);
|
land.load(esm, isDeleted);
|
||||||
|
|
||||||
// Same area defined in multiple plugins? -> last plugin wins
|
// 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);
|
return RecordId("", isDeleted);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue