mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-16 17:42:31 +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);
|
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…
x
Reference in New Issue
Block a user