1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-02-01 22:45:33 +00:00

Do not respawn container if player did not touch it

This commit is contained in:
Andrei Kortunov 2019-05-04 14:09:09 +04:00
parent c01153569d
commit 29cfd2c583

View file

@ -89,6 +89,10 @@ namespace MWClass
ptr.get<ESM::Container>();
if (ref->mBase->mFlags & ESM::Container::Respawn)
{
// Container was not touched, there is no need to modify its content.
if (ptr.getRefData().getCustomData() == nullptr)
return;
MWBase::Environment::get().getWorld()->removeContainerScripts(ptr);
ptr.getRefData().setCustomData(nullptr);
}