[General] Repurpose the unused ID_CONTAINER_REMOVE into ID_OBJECT_HEALTH

coverity_scan^2
David Cernat 8 years ago
parent 57f54aa370
commit d2cf96af99

@ -548,9 +548,9 @@ void Networking::processWorldPacket(RakNet::Packet *packet)
break;
}
case ID_CONTAINER_REMOVE:
case ID_OBJECT_HEALTH:
{
LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Received ID_CONTAINER_REMOVE from %s",
LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Received ID_OBJECT_HEALTH from %s",
player->npc.mName.c_str());
myPacket->Read(worldEvent);

@ -161,12 +161,12 @@ add_component_dir (openmw-mp
Packets/Player/PacketActiveSkills Packets/Player/PacketPlayerCellChange
Packets/Player/PacketPlayerCellState
Packets/World/PacketObjectDelete Packets/World/PacketObjectPlace Packets/World/PacketObjectLock
Packets/World/PacketObjectUnlock Packets/World/PacketObjectScale Packets/World/PacketObjectMove
Packets/World/PacketObjectRotate Packets/World/PacketObjectAnimPlay
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/PacketContainerAdd Packets/World/PacketContainerRemove Packets/World/PacketDoorState
Packets/World/PacketMusicPlay Packets/World/PacketVideoPlay
Packets/World/PacketContainerAdd Packets/World/PacketDoorState Packets/World/PacketMusicPlay
Packets/World/PacketVideoPlay
Packets/World/PacketScriptLocalShort Packets/World/PacketScriptLocalFloat Packets/World/PacketScriptMemberShort
Packets/World/PacketScriptGlobalShort)

@ -12,7 +12,7 @@
#include "../Packets/World/PacketObjectAnimPlay.hpp"
#include "../Packets/World/PacketContainerAdd.hpp"
#include "../Packets/World/PacketContainerRemove.hpp"
#include "../Packets/World/PacketObjectHealth.hpp"
#include "../Packets/World/PacketDoorState.hpp"
#include "../Packets/World/PacketMusicPlay.hpp"
#include "../Packets/World/PacketVideoPlay.hpp"
@ -44,7 +44,7 @@ mwmp::WorldPacketController::WorldPacketController(RakNet::RakPeerInterface *pee
AddPacket<PacketObjectAnimPlay>(&packets, peer);
AddPacket<PacketContainerAdd>(&packets, peer);
AddPacket<PacketContainerRemove>(&packets, peer);
AddPacket<PacketObjectHealth>(&packets, peer);
AddPacket<PacketDoorState>(&packets, peer);
AddPacket<PacketMusicPlay>(&packets, peer);
AddPacket<PacketVideoPlay>(&packets, peer);

@ -41,15 +41,15 @@ enum GameMessages
ID_OBJECT_PLACE,
ID_OBJECT_DELETE,
ID_OBJECT_SCALE,
ID_OBJECT_HEALTH,
ID_OBJECT_LOCK,
ID_OBJECT_UNLOCK,
ID_OBJECT_SCALE,
ID_OBJECT_MOVE,
ID_OBJECT_ROTATE,
ID_OBJECT_ANIM_PLAY,
ID_CONTAINER_ADD,
ID_CONTAINER_REMOVE,
ID_DOOR_STATE,
ID_MUSIC_PLAY,
ID_VIDEO_PLAY,

@ -1,14 +0,0 @@
#include <components/openmw-mp/NetworkMessages.hpp>
#include "PacketContainerRemove.hpp"
using namespace mwmp;
PacketContainerRemove::PacketContainerRemove(RakNet::RakPeerInterface *peer) : WorldPacket(peer)
{
packetID = ID_CONTAINER_REMOVE;
}
void PacketContainerRemove::Packet(RakNet::BitStream *bs, WorldEvent *event, bool send)
{
WorldPacket::Packet(bs, event, send);
}

@ -1,17 +0,0 @@
#ifndef OPENMW_PACKETCONTAINERREMOVE_HPP
#define OPENMW_PACKETCONTAINERREMOVE_HPP
#include <components/openmw-mp/Packets/World/WorldPacket.hpp>
namespace mwmp
{
class PacketContainerRemove : public WorldPacket
{
public:
PacketContainerRemove(RakNet::RakPeerInterface *peer);
virtual void Packet(RakNet::BitStream *bs, WorldEvent *event, bool send);
};
}
#endif //OPENMW_PACKETCONTAINERREMOVE_HPP

@ -0,0 +1,14 @@
#include <components/openmw-mp/NetworkMessages.hpp>
#include "PacketObjectHealth.hpp"
using namespace mwmp;
PacketObjectHealth::PacketObjectHealth(RakNet::RakPeerInterface *peer) : WorldPacket(peer)
{
packetID = ID_OBJECT_HEALTH;
}
void PacketObjectHealth::Packet(RakNet::BitStream *bs, WorldEvent *event, bool send)
{
WorldPacket::Packet(bs, event, send);
}

@ -0,0 +1,17 @@
#ifndef OPENMW_PACKETOBJECTHEALTH_HPP
#define OPENMW_PACKETOBJECTHEALTH_HPP
#include <components/openmw-mp/Packets/World/WorldPacket.hpp>
namespace mwmp
{
class PacketObjectHealth : public WorldPacket
{
public:
PacketObjectHealth(RakNet::RakPeerInterface *peer);
virtual void Packet(RakNet::BitStream *bs, WorldEvent *event, bool send);
};
}
#endif //OPENMW_PACKETOBJECTHEALTH_HPP
Loading…
Cancel
Save