From 0cebaec360fbfbe0a1d3a7dd62ec2d4d1b662b51 Mon Sep 17 00:00:00 2001 From: Petr Mikheev Date: Mon, 17 Apr 2023 18:47:29 +0200 Subject: [PATCH] Fix bug: world.createObject(id):moveTo(inventory) produces disabled objects that are visible in inventory, but can not be droped to the ground. --- apps/openmw/mwlua/objectbindings.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/openmw/mwlua/objectbindings.cpp b/apps/openmw/mwlua/objectbindings.cpp index 09ed8d26c2..e48e1d2582 100644 --- a/apps/openmw/mwlua/objectbindings.cpp +++ b/apps/openmw/mwlua/objectbindings.cpp @@ -308,6 +308,7 @@ namespace MWLua context.mLuaManager->addAction([item = object, count, cont = inventory.mObj] { auto& refData = item.ptr().getRefData(); refData.setCount(count); // temporarily undo removal to run ContainerStore::add + refData.enable(); cont.ptr().getClass().getContainerStore(cont.ptr()).add(item.ptr(), count, false); refData.setCount(0); });