From 3165c84db4f1dde9e3d1c22575d1008f4e5a788a Mon Sep 17 00:00:00 2001 From: David Cernat Date: Sun, 22 Jul 2018 22:43:40 +0300 Subject: [PATCH] [General] Rework PACKET_ORIGIN enum Additionally, comment out reading of originClientScript in ObjectPacket for now. --- components/openmw-mp/Base/BaseStructs.hpp | 10 ++++++---- components/openmw-mp/Packets/Object/ObjectPacket.cpp | 4 +++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/components/openmw-mp/Base/BaseStructs.hpp b/components/openmw-mp/Base/BaseStructs.hpp index e2e27cfff..391af7232 100644 --- a/components/openmw-mp/Base/BaseStructs.hpp +++ b/components/openmw-mp/Base/BaseStructs.hpp @@ -11,10 +11,12 @@ namespace mwmp { enum PACKET_ORIGIN { - GAMEPLAY = 0, - CONSOLE = 1, - CLIENT_SCRIPT = 2, - SERVER_SCRIPT = 3 + CLIENT_GAMEPLAY = 0, + CLIENT_CONSOLE = 1, + CLIENT_DIALOGUE = 2, + CLIENT_SCRIPT_LOCAL = 3, + CLIENT_SCRIPT_GLOBAL = 4, + SERVER_SCRIPT = 5 }; struct Item diff --git a/components/openmw-mp/Packets/Object/ObjectPacket.cpp b/components/openmw-mp/Packets/Object/ObjectPacket.cpp index 6e236d671..3ed21fe44 100644 --- a/components/openmw-mp/Packets/Object/ObjectPacket.cpp +++ b/components/openmw-mp/Packets/Object/ObjectPacket.cpp @@ -50,8 +50,10 @@ bool ObjectPacket::PacketHeader(RakNet::BitStream *bs, bool send) RW(objectList->packetOrigin, send); - if (objectList->packetOrigin == mwmp::CLIENT_SCRIPT) + /* Comment this out until it's implemented properly + if (objectList->packetOrigin == mwmp::CLIENT_SCRIPT_LOCAL) RW(objectList->originClientScript, send, true); + */ if (send) objectList->baseObjectCount = (unsigned int)(objectList->baseObjects.size());