diff --git a/apps/openmw-mp/Networking.cpp b/apps/openmw-mp/Networking.cpp index 293effa00..7ce0e9953 100644 --- a/apps/openmw-mp/Networking.cpp +++ b/apps/openmw-mp/Networking.cpp @@ -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); diff --git a/components/CMakeLists.txt b/components/CMakeLists.txt index abe54a9f6..c9087f1d3 100644 --- a/components/CMakeLists.txt +++ b/components/CMakeLists.txt @@ -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) diff --git a/components/openmw-mp/Controllers/WorldPacketController.cpp b/components/openmw-mp/Controllers/WorldPacketController.cpp index 4e43f35b6..7053e2b0b 100644 --- a/components/openmw-mp/Controllers/WorldPacketController.cpp +++ b/components/openmw-mp/Controllers/WorldPacketController.cpp @@ -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(&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 b3d52ad3c..f51ddc756 100644 --- a/components/openmw-mp/NetworkMessages.hpp +++ b/components/openmw-mp/NetworkMessages.hpp @@ -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, diff --git a/components/openmw-mp/Packets/World/PacketContainerRemove.cpp b/components/openmw-mp/Packets/World/PacketContainerRemove.cpp deleted file mode 100644 index 278cb5618..000000000 --- a/components/openmw-mp/Packets/World/PacketContainerRemove.cpp +++ /dev/null @@ -1,14 +0,0 @@ -#include -#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); -} diff --git a/components/openmw-mp/Packets/World/PacketContainerRemove.hpp b/components/openmw-mp/Packets/World/PacketContainerRemove.hpp deleted file mode 100644 index 55daf1a3e..000000000 --- a/components/openmw-mp/Packets/World/PacketContainerRemove.hpp +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef OPENMW_PACKETCONTAINERREMOVE_HPP -#define OPENMW_PACKETCONTAINERREMOVE_HPP - -#include - -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 diff --git a/components/openmw-mp/Packets/World/PacketObjectHealth.cpp b/components/openmw-mp/Packets/World/PacketObjectHealth.cpp new file mode 100644 index 000000000..930e0a791 --- /dev/null +++ b/components/openmw-mp/Packets/World/PacketObjectHealth.cpp @@ -0,0 +1,14 @@ +#include +#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); +} diff --git a/components/openmw-mp/Packets/World/PacketObjectHealth.hpp b/components/openmw-mp/Packets/World/PacketObjectHealth.hpp new file mode 100644 index 000000000..541fab0c6 --- /dev/null +++ b/components/openmw-mp/Packets/World/PacketObjectHealth.hpp @@ -0,0 +1,17 @@ +#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, WorldEvent *event, bool send); + }; +} + +#endif //OPENMW_PACKETOBJECTHEALTH_HPP