From 0fb9b6eefb165ea844690784745a5e750097bba1 Mon Sep 17 00:00:00 2001 From: David Cernat Date: Tue, 25 Oct 2016 12:53:18 +0300 Subject: [PATCH] On second thought, rename ID_OBJECT_MOVE_WORLD into ID_OBJECT_MOVE --- apps/openmw-mp/Networking.cpp | 12 ++++++------ components/CMakeLists.txt | 2 +- .../Controllers/WorldPacketController.cpp | 4 ++-- components/openmw-mp/NetworkMessages.hpp | 2 +- .../Packets/World/PacketObjectMove.cpp | 14 ++++++++++++++ .../Packets/World/PacketObjectMove.hpp | 17 +++++++++++++++++ .../Packets/World/PacketObjectMoveWorld.cpp | 14 -------------- .../Packets/World/PacketObjectMoveWorld.hpp | 17 ----------------- 8 files changed, 41 insertions(+), 41 deletions(-) create mode 100644 components/openmw-mp/Packets/World/PacketObjectMove.cpp create mode 100644 components/openmw-mp/Packets/World/PacketObjectMove.hpp delete mode 100644 components/openmw-mp/Packets/World/PacketObjectMoveWorld.cpp delete mode 100644 components/openmw-mp/Packets/World/PacketObjectMoveWorld.hpp diff --git a/apps/openmw-mp/Networking.cpp b/apps/openmw-mp/Networking.cpp index 7c8e00413..b6485d803 100644 --- a/apps/openmw-mp/Networking.cpp +++ b/apps/openmw-mp/Networking.cpp @@ -461,9 +461,9 @@ void Networking::ProcessWorldPacket(RakNet::Packet *packet) break; } - case ID_CONTAINER_ADD: + case ID_OBJECT_MOVE: { - LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Received ID_CONTAINER_ADD from %s", + LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Received ID_OBJECT_MOVE from %s", player->Npc()->mName.c_str()); myPacket->Read(event); @@ -478,9 +478,9 @@ void Networking::ProcessWorldPacket(RakNet::Packet *packet) break; } - case ID_CONTAINER_REMOVE: + case ID_CONTAINER_ADD: { - LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Received ID_CONTAINER_REMOVE from %s", + LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Received ID_CONTAINER_ADD from %s", player->Npc()->mName.c_str()); myPacket->Read(event); @@ -495,9 +495,9 @@ void Networking::ProcessWorldPacket(RakNet::Packet *packet) break; } - case ID_OBJECT_MOVE_WORLD: + case ID_CONTAINER_REMOVE: { - LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Received ID_OBJECT_MOVE_WORLD from %s", + LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Received ID_CONTAINER_REMOVE from %s", player->Npc()->mName.c_str()); myPacket->Read(event); diff --git a/components/CMakeLists.txt b/components/CMakeLists.txt index cf12c31a6..89bc7a25a 100644 --- a/components/CMakeLists.txt +++ b/components/CMakeLists.txt @@ -158,7 +158,7 @@ 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/PacketObjectMoveWorld + Packets/World/PacketObjectUnlock Packets/World/PacketObjectScale Packets/World/PacketObjectMove Packets/World/PacketContainerAdd Packets/World/PacketContainerRemove Packets/World/PacketDoorActivate Packets/World/PacketVideoPlay) diff --git a/components/openmw-mp/Controllers/WorldPacketController.cpp b/components/openmw-mp/Controllers/WorldPacketController.cpp index 88f58b85f..eee51a3b3 100644 --- a/components/openmw-mp/Controllers/WorldPacketController.cpp +++ b/components/openmw-mp/Controllers/WorldPacketController.cpp @@ -7,7 +7,7 @@ #include "../Packets/World/PacketObjectLock.hpp" #include "../Packets/World/PacketObjectUnlock.hpp" #include "../Packets/World/PacketObjectScale.hpp" -#include "../Packets/World/PacketObjectMoveWorld.hpp" +#include "../Packets/World/PacketObjectMove.hpp" #include "../Packets/World/PacketContainerAdd.hpp" #include "../Packets/World/PacketContainerRemove.hpp" @@ -31,7 +31,7 @@ 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); diff --git a/components/openmw-mp/NetworkMessages.hpp b/components/openmw-mp/NetworkMessages.hpp index f469d7a0b..7780090ed 100644 --- a/components/openmw-mp/NetworkMessages.hpp +++ b/components/openmw-mp/NetworkMessages.hpp @@ -38,7 +38,7 @@ enum GameMessages ID_OBJECT_LOCK, ID_OBJECT_UNLOCK, ID_OBJECT_SCALE, - ID_OBJECT_MOVE_WORLD, + ID_OBJECT_MOVE, ID_CONTAINER_ADD, ID_CONTAINER_REMOVE, diff --git a/components/openmw-mp/Packets/World/PacketObjectMove.cpp b/components/openmw-mp/Packets/World/PacketObjectMove.cpp new file mode 100644 index 000000000..9173410c4 --- /dev/null +++ b/components/openmw-mp/Packets/World/PacketObjectMove.cpp @@ -0,0 +1,14 @@ +#include +#include "PacketObjectMove.hpp" + +using namespace mwmp; + +PacketObjectMove::PacketObjectMove(RakNet::RakPeerInterface *peer) : WorldPacket(peer) +{ + packetID = ID_OBJECT_MOVE; +} + +void PacketObjectMove::Packet(RakNet::BitStream *bs, WorldEvent *event, bool send) +{ + WorldPacket::Packet(bs, event, send); +} diff --git a/components/openmw-mp/Packets/World/PacketObjectMove.hpp b/components/openmw-mp/Packets/World/PacketObjectMove.hpp new file mode 100644 index 000000000..ad41bc079 --- /dev/null +++ b/components/openmw-mp/Packets/World/PacketObjectMove.hpp @@ -0,0 +1,17 @@ +#ifndef OPENMW_PacketObjectMove_HPP +#define OPENMW_PacketObjectMove_HPP + +#include + +namespace mwmp +{ + class PacketObjectMove : public WorldPacket + { + public: + PacketObjectMove(RakNet::RakPeerInterface *peer); + + virtual void Packet(RakNet::BitStream *bs, WorldEvent *event, bool send); + }; +} + +#endif //OPENMW_PacketObjectMove_HPP diff --git a/components/openmw-mp/Packets/World/PacketObjectMoveWorld.cpp b/components/openmw-mp/Packets/World/PacketObjectMoveWorld.cpp deleted file mode 100644 index abe40432d..000000000 --- a/components/openmw-mp/Packets/World/PacketObjectMoveWorld.cpp +++ /dev/null @@ -1,14 +0,0 @@ -#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 deleted file mode 100644 index eb64473fd..000000000 --- a/components/openmw-mp/Packets/World/PacketObjectMoveWorld.hpp +++ /dev/null @@ -1,17 +0,0 @@ -#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