diff --git a/apps/openmw-mp/Cell.cpp b/apps/openmw-mp/Cell.cpp index c4a1c570d..fb28d9ef4 100644 --- a/apps/openmw-mp/Cell.cpp +++ b/apps/openmw-mp/Cell.cpp @@ -50,7 +50,7 @@ void Cell::sendToLoaded(mwmp::WorldPacket *worldPacket, mwmp::BaseEvent *baseEve for (auto pl : plList) { if (pl->guid == baseEvent->guid) continue; - worldPacket->Send(baseEvent, pl->guid); + worldPacket->Send(baseEvent, pl->guid); } } diff --git a/apps/openmw-mp/Networking.cpp b/apps/openmw-mp/Networking.cpp index 9c9db8a14..21fab4769 100644 --- a/apps/openmw-mp/Networking.cpp +++ b/apps/openmw-mp/Networking.cpp @@ -598,7 +598,14 @@ void Networking::processWorldPacket(RakNet::Packet *packet) player->npc.mName.c_str()); myPacket->Read(baseEvent); - myPacket->Send(baseEvent, true); + + // Until we have a timestamp-based system, send packets pertaining to more + // than one container (i.e. replies to server requests for container contents) + // only to players who have the container's cell loaded + if (baseEvent->action == BaseEvent::SET && baseEvent->objectChanges.count > 1) + CellController::get()->getCell(&baseEvent->cell)->sendToLoaded(myPacket, baseEvent); + else + myPacket->Send(baseEvent, true); Script::Call( player->getId(),