diff --git a/apps/openmw-mp/processors/world/ProcessorActorFrame.hpp b/apps/openmw-mp/processors/world/ProcessorActorFrame.hpp index 40acd03f0..38b693c7f 100644 --- a/apps/openmw-mp/processors/world/ProcessorActorFrame.hpp +++ b/apps/openmw-mp/processors/world/ProcessorActorFrame.hpp @@ -15,7 +15,11 @@ namespace mwmp void Do(WorldPacket &packet, Player &player, BaseEvent &event) override { - packet.Send(true); + // Send only to players who have the cell loaded + Cell *serverCell = CellController::get()->getCell(&event.cell); + + if (serverCell != nullptr) + serverCell->sendToLoaded(&packet, &event); Script::Call(player.getId(), event.cell.getDescription().c_str()); } diff --git a/apps/openmw-mp/processors/world/ProcessorActorList.hpp b/apps/openmw-mp/processors/world/ProcessorActorList.hpp index c2c6cb87c..e417c76b5 100644 --- a/apps/openmw-mp/processors/world/ProcessorActorList.hpp +++ b/apps/openmw-mp/processors/world/ProcessorActorList.hpp @@ -15,7 +15,11 @@ namespace mwmp void Do(WorldPacket &packet, Player &player, BaseEvent &event) override { - packet.Send(true); + // Send only to players who have the cell loaded + Cell *serverCell = CellController::get()->getCell(&event.cell); + + if (serverCell != nullptr) + serverCell->sendToLoaded(&packet, &event); Script::Call(player.getId(), event.cell.getDescription().c_str()); }