From 947a677801ff9e4ad627004aaed6ede9dffe434c Mon Sep 17 00:00:00 2001 From: David Cernat Date: Tue, 25 Oct 2016 12:42:29 +0300 Subject: [PATCH] Replace ID_ACTIVATOR_ACTIVATE with ID_OBJECT_MOVE_WORLD --- apps/openmw-mp/Networking.cpp | 8 ++++---- components/CMakeLists.txt | 4 ++-- .../Controllers/WorldPacketController.cpp | 4 ++-- components/openmw-mp/NetworkMessages.hpp | 2 +- .../Packets/World/PacketActivatorActivate.cpp | 14 -------------- .../Packets/World/PacketActivatorActivate.hpp | 17 ----------------- .../Packets/World/PacketObjectMoveWorld.cpp | 14 ++++++++++++++ .../Packets/World/PacketObjectMoveWorld.hpp | 17 +++++++++++++++++ 8 files changed, 40 insertions(+), 40 deletions(-) delete mode 100644 components/openmw-mp/Packets/World/PacketActivatorActivate.cpp delete mode 100644 components/openmw-mp/Packets/World/PacketActivatorActivate.hpp create mode 100644 components/openmw-mp/Packets/World/PacketObjectMoveWorld.cpp create mode 100644 components/openmw-mp/Packets/World/PacketObjectMoveWorld.hpp diff --git a/apps/openmw-mp/Networking.cpp b/apps/openmw-mp/Networking.cpp index 715552025..7c8e00413 100644 --- a/apps/openmw-mp/Networking.cpp +++ b/apps/openmw-mp/Networking.cpp @@ -495,9 +495,9 @@ void Networking::ProcessWorldPacket(RakNet::Packet *packet) break; } - case ID_DOOR_ACTIVATE: + case ID_OBJECT_MOVE_WORLD: { - LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Received ID_DOOR_ACTIVATE from %s", + LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Received ID_OBJECT_MOVE_WORLD from %s", player->Npc()->mName.c_str()); myPacket->Read(event); @@ -512,9 +512,9 @@ void Networking::ProcessWorldPacket(RakNet::Packet *packet) break; } - case ID_ACTIVATOR_ACTIVATE: + case ID_DOOR_ACTIVATE: { - LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Received ID_ACTIVATOR_ACTIVATE from %s", + LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Received ID_DOOR_ACTIVATE from %s", player->Npc()->mName.c_str()); myPacket->Read(event); diff --git a/components/CMakeLists.txt b/components/CMakeLists.txt index e945d7f11..cf12c31a6 100644 --- a/components/CMakeLists.txt +++ b/components/CMakeLists.txt @@ -158,10 +158,10 @@ add_component_dir (openmw-mp Packets/Player/PacketTime Packets/Player/PacketInventory Packets/World/PacketObjectDelete Packets/World/PacketObjectPlace Packets/World/PacketObjectLock - Packets/World/PacketObjectUnlock Packets/World/PacketObjectScale + Packets/World/PacketObjectUnlock Packets/World/PacketObjectScale Packets/World/PacketObjectMoveWorld Packets/World/PacketContainerAdd Packets/World/PacketContainerRemove Packets/World/PacketDoorActivate - Packets/World/PacketActivatorActivate Packets/World/PacketVideoPlay) + Packets/World/PacketVideoPlay) add_component_dir (fallback fallback validate diff --git a/components/openmw-mp/Controllers/WorldPacketController.cpp b/components/openmw-mp/Controllers/WorldPacketController.cpp index 231feda0d..88f58b85f 100644 --- a/components/openmw-mp/Controllers/WorldPacketController.cpp +++ b/components/openmw-mp/Controllers/WorldPacketController.cpp @@ -7,11 +7,11 @@ #include "../Packets/World/PacketObjectLock.hpp" #include "../Packets/World/PacketObjectUnlock.hpp" #include "../Packets/World/PacketObjectScale.hpp" +#include "../Packets/World/PacketObjectMoveWorld.hpp" #include "../Packets/World/PacketContainerAdd.hpp" #include "../Packets/World/PacketContainerRemove.hpp" #include "../Packets/World/PacketDoorActivate.hpp" -#include "../Packets/World/PacketActivatorActivate.hpp" #include "../Packets/World/PacketVideoPlay.hpp" #include "WorldPacketController.hpp" @@ -31,11 +31,11 @@ mwmp::WorldPacketController::WorldPacketController(RakNet::RakPeerInterface *pee AddPacket(&packets, peer); AddPacket(&packets, peer); AddPacket(&packets, peer); + AddPacket(&packets, peer); AddPacket(&packets, peer); AddPacket(&packets, peer); AddPacket(&packets, peer); - AddPacket(&packets, peer); AddPacket(&packets, peer); } diff --git a/components/openmw-mp/NetworkMessages.hpp b/components/openmw-mp/NetworkMessages.hpp index 4b9679a3c..f469d7a0b 100644 --- a/components/openmw-mp/NetworkMessages.hpp +++ b/components/openmw-mp/NetworkMessages.hpp @@ -38,11 +38,11 @@ enum GameMessages ID_OBJECT_LOCK, ID_OBJECT_UNLOCK, ID_OBJECT_SCALE, + ID_OBJECT_MOVE_WORLD, ID_CONTAINER_ADD, ID_CONTAINER_REMOVE, ID_DOOR_ACTIVATE, - ID_ACTIVATOR_ACTIVATE, ID_VIDEO_PLAY }; diff --git a/components/openmw-mp/Packets/World/PacketActivatorActivate.cpp b/components/openmw-mp/Packets/World/PacketActivatorActivate.cpp deleted file mode 100644 index 2a1b9ad64..000000000 --- a/components/openmw-mp/Packets/World/PacketActivatorActivate.cpp +++ /dev/null @@ -1,14 +0,0 @@ -#include -#include "PacketActivatorActivate.hpp" - -using namespace mwmp; - -PacketActivatorActivate::PacketActivatorActivate(RakNet::RakPeerInterface *peer) : WorldPacket(peer) -{ - packetID = ID_ACTIVATOR_ACTIVATE; -} - -void PacketActivatorActivate::Packet(RakNet::BitStream *bs, WorldEvent *event, bool send) -{ - WorldPacket::Packet(bs, event, send); -} diff --git a/components/openmw-mp/Packets/World/PacketActivatorActivate.hpp b/components/openmw-mp/Packets/World/PacketActivatorActivate.hpp deleted file mode 100644 index abb764cbb..000000000 --- a/components/openmw-mp/Packets/World/PacketActivatorActivate.hpp +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef OPENMW_PACKETACTIVATORACTIVATE_HPP -#define OPENMW_PACKETACTIVATORACTIVATE_HPP - -#include - -namespace mwmp -{ - class PacketActivatorActivate : public WorldPacket - { - public: - PacketActivatorActivate(RakNet::RakPeerInterface *peer); - - virtual void Packet(RakNet::BitStream *bs, WorldEvent *event, bool send); - }; -} - -#endif //OPENMW_PACKETACTIVATORACTIVATE_HPP diff --git a/components/openmw-mp/Packets/World/PacketObjectMoveWorld.cpp b/components/openmw-mp/Packets/World/PacketObjectMoveWorld.cpp new file mode 100644 index 000000000..abe40432d --- /dev/null +++ b/components/openmw-mp/Packets/World/PacketObjectMoveWorld.cpp @@ -0,0 +1,14 @@ +#include +#include "PacketObjectMoveWorld.hpp" + +using namespace mwmp; + +PacketObjectMoveWorld::PacketObjectMoveWorld(RakNet::RakPeerInterface *peer) : WorldPacket(peer) +{ + packetID = ID_OBJECT_MOVE_WORLD; +} + +void PacketObjectMoveWorld::Packet(RakNet::BitStream *bs, WorldEvent *event, bool send) +{ + WorldPacket::Packet(bs, event, send); +} diff --git a/components/openmw-mp/Packets/World/PacketObjectMoveWorld.hpp b/components/openmw-mp/Packets/World/PacketObjectMoveWorld.hpp new file mode 100644 index 000000000..eb64473fd --- /dev/null +++ b/components/openmw-mp/Packets/World/PacketObjectMoveWorld.hpp @@ -0,0 +1,17 @@ +#ifndef OPENMW_PACKETOBJECTMOVEWORLD_HPP +#define OPENMW_PACKETOBJECTMOVEWORLD_HPP + +#include + +namespace mwmp +{ + class PacketObjectMoveWorld : public WorldPacket + { + public: + PacketObjectMoveWorld(RakNet::RakPeerInterface *peer); + + virtual void Packet(RakNet::BitStream *bs, WorldEvent *event, bool send); + }; +} + +#endif //OPENMW_PACKETOBJECTMOVEWORLD_HPP