1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-28 12:09:53 +00:00

Fix bug: world.createObject(id):moveTo(inventory) produces disabled objects that are visible in inventory, but can not be droped to the ground.

This commit is contained in:
Petr Mikheev 2023-04-17 18:47:29 +02:00
parent 60a8d08e66
commit 0cebaec360

View file

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