Fix #7441: Objects that are removed and disabled in the same frame via lua remain in the world but become uninteractable

revert-6246b479
Petr Mikheev 2 years ago
parent fc5d73648a
commit 39fc832fde

@ -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…
Cancel
Save