From 9130c1f302a0cddf10ab47b997f13d02cd28d62f Mon Sep 17 00:00:00 2001 From: David Cernat Date: Sat, 4 Feb 2017 13:14:37 +0200 Subject: [PATCH] [General] Rename ID_CONTAINER_ADD into ID_CONTAINER --- apps/openmw-mp/Networking.cpp | 4 ++-- components/CMakeLists.txt | 2 +- .../Controllers/WorldPacketController.cpp | 12 ++++++------ components/openmw-mp/NetworkMessages.hpp | 2 +- .../openmw-mp/Packets/World/PacketContainer.cpp | 14 ++++++++++++++ .../openmw-mp/Packets/World/PacketContainer.hpp | 17 +++++++++++++++++ .../Packets/World/PacketContainerAdd.cpp | 14 -------------- .../Packets/World/PacketContainerAdd.hpp | 17 ----------------- 8 files changed, 41 insertions(+), 41 deletions(-) create mode 100644 components/openmw-mp/Packets/World/PacketContainer.cpp create mode 100644 components/openmw-mp/Packets/World/PacketContainer.hpp delete mode 100644 components/openmw-mp/Packets/World/PacketContainerAdd.cpp delete mode 100644 components/openmw-mp/Packets/World/PacketContainerAdd.hpp diff --git a/apps/openmw-mp/Networking.cpp b/apps/openmw-mp/Networking.cpp index 7ce0e9953..c2899bfb1 100644 --- a/apps/openmw-mp/Networking.cpp +++ b/apps/openmw-mp/Networking.cpp @@ -537,9 +537,9 @@ void Networking::processWorldPacket(RakNet::Packet *packet) break; } - case ID_CONTAINER_ADD: + case ID_CONTAINER: { - LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Received ID_CONTAINER_ADD from %s", + LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Received ID_CONTAINER from %s", player->npc.mName.c_str()); myPacket->Read(worldEvent); diff --git a/components/CMakeLists.txt b/components/CMakeLists.txt index c9087f1d3..97b518c6d 100644 --- a/components/CMakeLists.txt +++ b/components/CMakeLists.txt @@ -165,7 +165,7 @@ add_component_dir (openmw-mp Packets/World/PacketObjectHealth Packets/World/PacketObjectLock Packets/World/PacketObjectUnlock Packets/World/PacketObjectMove Packets/World/PacketObjectRotate Packets/World/PacketObjectAnimPlay - Packets/World/PacketContainerAdd Packets/World/PacketDoorState Packets/World/PacketMusicPlay + Packets/World/PacketContainer Packets/World/PacketDoorState Packets/World/PacketMusicPlay Packets/World/PacketVideoPlay Packets/World/PacketScriptLocalShort Packets/World/PacketScriptLocalFloat Packets/World/PacketScriptMemberShort diff --git a/components/openmw-mp/Controllers/WorldPacketController.cpp b/components/openmw-mp/Controllers/WorldPacketController.cpp index 7053e2b0b..f66c3a43e 100644 --- a/components/openmw-mp/Controllers/WorldPacketController.cpp +++ b/components/openmw-mp/Controllers/WorldPacketController.cpp @@ -4,15 +4,15 @@ #include "../Packets/World/PacketObjectDelete.hpp" #include "../Packets/World/PacketObjectPlace.hpp" +#include "../Packets/World/PacketObjectScale.hpp" +#include "../Packets/World/PacketObjectHealth.hpp" #include "../Packets/World/PacketObjectLock.hpp" #include "../Packets/World/PacketObjectUnlock.hpp" -#include "../Packets/World/PacketObjectScale.hpp" #include "../Packets/World/PacketObjectMove.hpp" #include "../Packets/World/PacketObjectRotate.hpp" #include "../Packets/World/PacketObjectAnimPlay.hpp" -#include "../Packets/World/PacketContainerAdd.hpp" -#include "../Packets/World/PacketObjectHealth.hpp" +#include "../Packets/World/PacketContainer.hpp" #include "../Packets/World/PacketDoorState.hpp" #include "../Packets/World/PacketMusicPlay.hpp" #include "../Packets/World/PacketVideoPlay.hpp" @@ -36,15 +36,15 @@ 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); 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 f51ddc756..290646bbe 100644 --- a/components/openmw-mp/NetworkMessages.hpp +++ b/components/openmw-mp/NetworkMessages.hpp @@ -49,7 +49,7 @@ enum GameMessages ID_OBJECT_ROTATE, ID_OBJECT_ANIM_PLAY, - ID_CONTAINER_ADD, + ID_CONTAINER, ID_DOOR_STATE, ID_MUSIC_PLAY, ID_VIDEO_PLAY, diff --git a/components/openmw-mp/Packets/World/PacketContainer.cpp b/components/openmw-mp/Packets/World/PacketContainer.cpp new file mode 100644 index 000000000..2cb933225 --- /dev/null +++ b/components/openmw-mp/Packets/World/PacketContainer.cpp @@ -0,0 +1,14 @@ +#include +#include "PacketContainer.hpp" + +using namespace mwmp; + +PacketContainer::PacketContainer(RakNet::RakPeerInterface *peer) : WorldPacket(peer) +{ + packetID = ID_CONTAINER; +} + +void PacketContainer::Packet(RakNet::BitStream *bs, WorldEvent *event, bool send) +{ + WorldPacket::Packet(bs, event, send); +} diff --git a/components/openmw-mp/Packets/World/PacketContainer.hpp b/components/openmw-mp/Packets/World/PacketContainer.hpp new file mode 100644 index 000000000..8c80ff7a8 --- /dev/null +++ b/components/openmw-mp/Packets/World/PacketContainer.hpp @@ -0,0 +1,17 @@ +#ifndef OPENMW_PACKETCONTAINER_HPP +#define OPENMW_PACKETCONTAINER_HPP + +#include + +namespace mwmp +{ + class PacketContainer : public WorldPacket + { + public: + PacketContainer(RakNet::RakPeerInterface *peer); + + virtual void Packet(RakNet::BitStream *bs, WorldEvent *event, bool send); + }; +} + +#endif //OPENMW_PACKETCONTAINER_HPP diff --git a/components/openmw-mp/Packets/World/PacketContainerAdd.cpp b/components/openmw-mp/Packets/World/PacketContainerAdd.cpp deleted file mode 100644 index 57f1794b4..000000000 --- a/components/openmw-mp/Packets/World/PacketContainerAdd.cpp +++ /dev/null @@ -1,14 +0,0 @@ -#include -#include "PacketContainerAdd.hpp" - -using namespace mwmp; - -PacketContainerAdd::PacketContainerAdd(RakNet::RakPeerInterface *peer) : WorldPacket(peer) -{ - packetID = ID_CONTAINER_ADD; -} - -void PacketContainerAdd::Packet(RakNet::BitStream *bs, WorldEvent *event, bool send) -{ - WorldPacket::Packet(bs, event, send); -} diff --git a/components/openmw-mp/Packets/World/PacketContainerAdd.hpp b/components/openmw-mp/Packets/World/PacketContainerAdd.hpp deleted file mode 100644 index 6e2e2b486..000000000 --- a/components/openmw-mp/Packets/World/PacketContainerAdd.hpp +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef OPENMW_PACKETCONTAINERADD_HPP -#define OPENMW_PACKETCONTAINERADD_HPP - -#include - -namespace mwmp -{ - class PacketContainerAdd : public WorldPacket - { - public: - PacketContainerAdd(RakNet::RakPeerInterface *peer); - - virtual void Packet(RakNet::BitStream *bs, WorldEvent *event, bool send); - }; -} - -#endif //OPENMW_PACKETCONTAINERADD_HPP