From 83014d6381f0030293ebcac04e591bc328f5643f Mon Sep 17 00:00:00 2001 From: David Cernat Date: Tue, 5 Jun 2018 14:55:57 +0300 Subject: [PATCH] [Client] Set actors as the owners of their items when editing containers --- apps/openmw/mwmp/ObjectList.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/openmw/mwmp/ObjectList.cpp b/apps/openmw/mwmp/ObjectList.cpp index 481e472a3..72fc20572 100644 --- a/apps/openmw/mwmp/ObjectList.cpp +++ b/apps/openmw/mwmp/ObjectList.cpp @@ -149,7 +149,8 @@ void ObjectList::editContainers(MWWorld::CellStore* cellStore) bool isLocalTakeAll = isLocalEvent && containerSubAction == BaseObjectList::TAKE_ALL; std::string takeAllSound = ""; - MWWorld::Ptr ownerPtr = MWBase::Environment::get().getWorld()->getPlayerPtr(); + MWWorld::Ptr ownerPtr = ptrFound.getClass().isActor() ? ptrFound : MWBase::Environment::get().getWorld()->getPlayerPtr(); + for (const auto &containerItem : baseObject.containerItems) { //LOG_APPEND(Log::LOG_VERBOSE, "-- containerItem cellRef: %s, count: %i, actionCount: %i",