mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-28 21:39:48 +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:
parent
60a8d08e66
commit
0cebaec360
1 changed files with 1 additions and 0 deletions
|
@ -308,6 +308,7 @@ namespace MWLua
|
||||||
context.mLuaManager->addAction([item = object, count, cont = inventory.mObj] {
|
context.mLuaManager->addAction([item = object, count, cont = inventory.mObj] {
|
||||||
auto& refData = item.ptr().getRefData();
|
auto& refData = item.ptr().getRefData();
|
||||||
refData.setCount(count); // temporarily undo removal to run ContainerStore::add
|
refData.setCount(count); // temporarily undo removal to run ContainerStore::add
|
||||||
|
refData.enable();
|
||||||
cont.ptr().getClass().getContainerStore(cont.ptr()).add(item.ptr(), count, false);
|
cont.ptr().getClass().getContainerStore(cont.ptr()).add(item.ptr(), count, false);
|
||||||
refData.setCount(0);
|
refData.setCount(0);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue