Do not set owner when adding items to a container, as opposed to NPC/creatures

actorid
scrawl 11 years ago
parent fe66012bcd
commit 2836c7c927

@ -149,7 +149,7 @@ MWWorld::ContainerStoreIterator MWWorld::ContainerStore::add (const Ptr& itemPtr
item.getCellRef().mPos.pos[1] = 0;
item.getCellRef().mPos.pos[2] = 0;
if (setOwner)
if (setOwner && actorPtr.getClass().isActor())
item.getCellRef().mOwner = actorPtr.getCellRef().mRefID;
std::string script = MWWorld::Class::get(item).getScript(item);

Loading…
Cancel
Save