mirror of
https://github.com/OpenMW/openmw.git
synced 2025-04-02 08:36:40 +00:00
Fix #7441: Objects that are removed and disabled in the same frame via lua remain in the world but become uninteractable
This commit is contained in:
parent
fc5d73648a
commit
39fc832fde
1 changed files with 2 additions and 0 deletions
|
@ -291,6 +291,8 @@ namespace MWLua
|
|||
if (enable && object.ptr().getRefData().isDeleted())
|
||||
throw std::runtime_error("Object is removed");
|
||||
context.mLuaManager->addAction([object, enable] {
|
||||
if (object.ptr().getRefData().isDeleted())
|
||||
return;
|
||||
if (object.ptr().isInCell())
|
||||
{
|
||||
if (enable)
|
||||
|
|
Loading…
Reference in a new issue