1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 18:19:55 +00:00

[Client] Set actors as the owners of their items when editing containers

This commit is contained in:
David Cernat 2018-06-05 14:55:57 +03:00
parent bacecc93e3
commit 83014d6381

View file

@ -149,7 +149,8 @@ void ObjectList::editContainers(MWWorld::CellStore* cellStore)
bool isLocalTakeAll = isLocalEvent && containerSubAction == BaseObjectList::TAKE_ALL; bool isLocalTakeAll = isLocalEvent && containerSubAction == BaseObjectList::TAKE_ALL;
std::string takeAllSound = ""; 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) for (const auto &containerItem : baseObject.containerItems)
{ {
//LOG_APPEND(Log::LOG_VERBOSE, "-- containerItem cellRef: %s, count: %i, actionCount: %i", //LOG_APPEND(Log::LOG_VERBOSE, "-- containerItem cellRef: %s, count: %i, actionCount: %i",