1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-04 03:40:14 +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:
Petr Mikheev 2023-06-28 21:43:30 +02:00
parent fc5d73648a
commit 39fc832fde

View File

@ -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)