On second thought, rename ID_OBJECT_MOVE_WORLD into ID_OBJECT_MOVE

coverity_scan^2
David Cernat 8 years ago
parent 947a677801
commit 0fb9b6eefb

@ -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);

@ -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)

@ -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<PacketObjectLock>(&packets, peer);
AddPacket<PacketObjectUnlock>(&packets, peer);
AddPacket<PacketObjectScale>(&packets, peer);
AddPacket<PacketObjectMoveWorld>(&packets, peer);
AddPacket<PacketObjectMove>(&packets, peer);
AddPacket<PacketContainerAdd>(&packets, peer);
AddPacket<PacketContainerRemove>(&packets, peer);

@ -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,

@ -0,0 +1,14 @@
#include <components/openmw-mp/NetworkMessages.hpp>
#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);
}

@ -0,0 +1,17 @@
#ifndef OPENMW_PacketObjectMove_HPP
#define OPENMW_PacketObjectMove_HPP
#include <components/openmw-mp/Packets/World/WorldPacket.hpp>
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

@ -1,14 +0,0 @@
#include <components/openmw-mp/NetworkMessages.hpp>
#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);
}

@ -1,17 +0,0 @@
#ifndef OPENMW_PACKETOBJECTMOVEWORLD_HPP
#define OPENMW_PACKETOBJECTMOVEWORLD_HPP
#include <components/openmw-mp/Packets/World/WorldPacket.hpp>
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
Loading…
Cancel
Save