forked from mirror/openmw-tes3mp
[Server] Send large ID_CONTAINER packets on a need-to-know basis
This commit is contained in:
parent
791089d342
commit
24251cafd0
2 changed files with 9 additions and 2 deletions
|
@ -598,6 +598,13 @@ void Networking::processWorldPacket(RakNet::Packet *packet)
|
||||||
player->npc.mName.c_str());
|
player->npc.mName.c_str());
|
||||||
|
|
||||||
myPacket->Read(baseEvent);
|
myPacket->Read(baseEvent);
|
||||||
|
|
||||||
|
// 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);
|
myPacket->Send(baseEvent, true);
|
||||||
|
|
||||||
Script::Call<Script::CallbackIdentity("OnContainer")>(
|
Script::Call<Script::CallbackIdentity("OnContainer")>(
|
||||||
|
|
Loading…
Reference in a new issue