From 8c019f2c61715246ec61188784e5721cb929c3ef Mon Sep 17 00:00:00 2001 From: David Cernat Date: Tue, 31 Jan 2017 23:26:49 +0200 Subject: [PATCH] [Server] Update OnObjectPlace and OnObjectDelete callbacks --- apps/openmw-mp/Networking.cpp | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/apps/openmw-mp/Networking.cpp b/apps/openmw-mp/Networking.cpp index 20fb5ee95..5b2ed42d1 100644 --- a/apps/openmw-mp/Networking.cpp +++ b/apps/openmw-mp/Networking.cpp @@ -425,7 +425,6 @@ void Networking::processWorldPacket(RakNet::Packet *packet) } worldEvent = new WorldEvent(player->guid); - mwmp::WorldObject worldObject; switch (packet->data[0]) { @@ -438,14 +437,9 @@ void Networking::processWorldPacket(RakNet::Packet *packet) myPacket->Read(worldEvent); myPacket->Send(worldEvent, true); - for (unsigned int i = 0; i < worldEvent->objectChanges.count; i++) - { - worldObject = worldEvent->objectChanges.objects[i]; - - Script::Call( - player->getId(), - worldEvent->cell.getDescription().c_str()); - } + Script::Call( + player->getId(), + worldEvent->cell.getDescription().c_str()); break; } @@ -458,16 +452,9 @@ void Networking::processWorldPacket(RakNet::Packet *packet) myPacket->Read(worldEvent); myPacket->Send(worldEvent, true); - ESM::CellRef cellRef; - - for (unsigned int i = 0; i < worldEvent->objectChanges.count; i++) - { - worldObject = worldEvent->objectChanges.objects[i]; - - Script::Call( - player->getId(), - worldEvent->cell.getDescription().c_str()); - } + Script::Call( + player->getId(), + worldEvent->cell.getDescription().c_str()); break; }