From 27c4015f506f66a76dd16a08aaf76ffc1723330b Mon Sep 17 00:00:00 2001 From: David Cernat Date: Thu, 16 Feb 2017 18:46:39 +0200 Subject: [PATCH] [General] Remove unused packet placeholder ID_OBJECT_HEALTH --- apps/openmw-mp/Networking.cpp | 11 ----------- components/CMakeLists.txt | 4 ++-- .../Controllers/WorldPacketController.cpp | 2 -- components/openmw-mp/NetworkMessages.hpp | 1 - .../Packets/World/PacketObjectHealth.cpp | 14 -------------- .../Packets/World/PacketObjectHealth.hpp | 17 ----------------- 6 files changed, 2 insertions(+), 47 deletions(-) delete mode 100644 components/openmw-mp/Packets/World/PacketObjectHealth.cpp delete mode 100644 components/openmw-mp/Packets/World/PacketObjectHealth.hpp diff --git a/apps/openmw-mp/Networking.cpp b/apps/openmw-mp/Networking.cpp index 917eac56c..0d3948df5 100644 --- a/apps/openmw-mp/Networking.cpp +++ b/apps/openmw-mp/Networking.cpp @@ -537,17 +537,6 @@ void Networking::processWorldPacket(RakNet::Packet *packet) break; } - case ID_OBJECT_HEALTH: - { - LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Received ID_OBJECT_HEALTH from %s", - player->npc.mName.c_str()); - - myPacket->Read(baseEvent); - myPacket->Send(baseEvent, true); - - break; - } - case ID_DOOR_STATE: { LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Received ID_DOOR_STATE from %s", diff --git a/components/CMakeLists.txt b/components/CMakeLists.txt index 8fbdb72d3..7c0c4e456 100644 --- a/components/CMakeLists.txt +++ b/components/CMakeLists.txt @@ -164,8 +164,8 @@ add_component_dir (openmw-mp Packets/Player/PacketGUIBoxes Packets/Player/PacketTime Packets/World/PacketObjectDelete Packets/World/PacketObjectPlace Packets/World/PacketObjectScale - Packets/World/PacketObjectHealth Packets/World/PacketObjectLock Packets/World/PacketObjectUnlock - Packets/World/PacketObjectMove Packets/World/PacketObjectRotate Packets/World/PacketObjectAnimPlay + Packets/World/PacketObjectLock Packets/World/PacketObjectUnlock Packets/World/PacketObjectMove + Packets/World/PacketObjectRotate Packets/World/PacketObjectAnimPlay Packets/World/PacketContainer Packets/World/PacketDoorState Packets/World/PacketMusicPlay Packets/World/PacketVideoPlay diff --git a/components/openmw-mp/Controllers/WorldPacketController.cpp b/components/openmw-mp/Controllers/WorldPacketController.cpp index f66c3a43e..dece05a83 100644 --- a/components/openmw-mp/Controllers/WorldPacketController.cpp +++ b/components/openmw-mp/Controllers/WorldPacketController.cpp @@ -5,7 +5,6 @@ #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/PacketObjectMove.hpp" @@ -37,7 +36,6 @@ 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 85f8a1a46..0da02b08f 100644 --- a/components/openmw-mp/NetworkMessages.hpp +++ b/components/openmw-mp/NetworkMessages.hpp @@ -42,7 +42,6 @@ enum GameMessages ID_OBJECT_PLACE, ID_OBJECT_DELETE, ID_OBJECT_SCALE, - ID_OBJECT_HEALTH, ID_OBJECT_LOCK, ID_OBJECT_UNLOCK, ID_OBJECT_MOVE, diff --git a/components/openmw-mp/Packets/World/PacketObjectHealth.cpp b/components/openmw-mp/Packets/World/PacketObjectHealth.cpp deleted file mode 100644 index 46411134f..000000000 --- a/components/openmw-mp/Packets/World/PacketObjectHealth.cpp +++ /dev/null @@ -1,14 +0,0 @@ -#include -#include "PacketObjectHealth.hpp" - -using namespace mwmp; - -PacketObjectHealth::PacketObjectHealth(RakNet::RakPeerInterface *peer) : WorldPacket(peer) -{ - packetID = ID_OBJECT_HEALTH; -} - -void PacketObjectHealth::Packet(RakNet::BitStream *bs, BaseEvent *event, bool send) -{ - WorldPacket::Packet(bs, event, send); -} diff --git a/components/openmw-mp/Packets/World/PacketObjectHealth.hpp b/components/openmw-mp/Packets/World/PacketObjectHealth.hpp deleted file mode 100644 index fca1b634f..000000000 --- a/components/openmw-mp/Packets/World/PacketObjectHealth.hpp +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef OPENMW_PACKETOBJECTHEALTH_HPP -#define OPENMW_PACKETOBJECTHEALTH_HPP - -#include - -namespace mwmp -{ - class PacketObjectHealth : public WorldPacket - { - public: - PacketObjectHealth(RakNet::RakPeerInterface *peer); - - virtual void Packet(RakNet::BitStream *bs, BaseEvent *event, bool send); - }; -} - -#endif //OPENMW_PACKETOBJECTHEALTH_HPP