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:
parent
c01153569d
commit
29cfd2c583
1 changed files with 4 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue