diff --git a/apps/openmw-mp/Networking.cpp b/apps/openmw-mp/Networking.cpp index 44b09eeeb..c6c09d9a9 100644 --- a/apps/openmw-mp/Networking.cpp +++ b/apps/openmw-mp/Networking.cpp @@ -551,9 +551,9 @@ void Networking::processWorldPacket(RakNet::Packet *packet) break; } - case ID_DOOR_ACTIVATE: + case ID_DOOR_STATE: { - LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Received ID_DOOR_ACTIVATE from %s", + LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Received ID_DOOR_STATE from %s", player->npc.mName.c_str()); myPacket->Read(worldEvent); diff --git a/apps/openmw/mwmp/Networking.cpp b/apps/openmw/mwmp/Networking.cpp index 2eaa046f2..8e06ca6ea 100644 --- a/apps/openmw/mwmp/Networking.cpp +++ b/apps/openmw/mwmp/Networking.cpp @@ -821,13 +821,13 @@ void Networking::processWorldPacket(RakNet::Packet *packet) break; } - case ID_DOOR_ACTIVATE: + case ID_DOOR_STATE: { MWWorld::CellStore *ptrCellStore = Main::get().getWorldController()->getCell(event->cell); if (!ptrCellStore) return; - LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Received ID_DOOR_ACTIVATE"); + LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Received ID_DOOR_STATE"); event->activateDoors(ptrCellStore); break; diff --git a/apps/openmw/mwworld/worldimp.cpp b/apps/openmw/mwworld/worldimp.cpp index 4bfebca48..cf341e1d8 100644 --- a/apps/openmw/mwworld/worldimp.cpp +++ b/apps/openmw/mwworld/worldimp.cpp @@ -2275,7 +2275,7 @@ namespace MWWorld worldObject.state = state; event->addObject(worldObject); - mwmp::Main::get().getNetworking()->getWorldPacket(ID_DOOR_ACTIVATE)->Send(event); + mwmp::Main::get().getNetworking()->getWorldPacket(ID_DOOR_STATE)->Send(event); LOG_MESSAGE_SIMPLE(Log::LOG_VERBOSE, "Door activation 1\n- cellRef: %s, %i\n- cell: %s\n- state: %s", worldObject.refId.c_str(), @@ -2302,7 +2302,7 @@ namespace MWWorld worldObject.state = state; event->addObject(worldObject); - mwmp::Main::get().getNetworking()->getWorldPacket(ID_DOOR_ACTIVATE)->Send(event); + mwmp::Main::get().getNetworking()->getWorldPacket(ID_DOOR_STATE)->Send(event); LOG_MESSAGE_SIMPLE(Log::LOG_VERBOSE, "Door activation 2\n- cellRef: %s, %i\n- cell: %s\n- state: %s", worldObject.refId.c_str(), diff --git a/components/CMakeLists.txt b/components/CMakeLists.txt index 7c6cd666b..abe54a9f6 100644 --- a/components/CMakeLists.txt +++ b/components/CMakeLists.txt @@ -165,7 +165,7 @@ add_component_dir (openmw-mp Packets/World/PacketObjectUnlock Packets/World/PacketObjectScale Packets/World/PacketObjectMove Packets/World/PacketObjectRotate Packets/World/PacketObjectAnimPlay - Packets/World/PacketContainerAdd Packets/World/PacketContainerRemove Packets/World/PacketDoorActivate + Packets/World/PacketContainerAdd Packets/World/PacketContainerRemove 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 9d073e4db..4e43f35b6 100644 --- a/components/openmw-mp/Controllers/WorldPacketController.cpp +++ b/components/openmw-mp/Controllers/WorldPacketController.cpp @@ -13,7 +13,7 @@ #include "../Packets/World/PacketContainerAdd.hpp" #include "../Packets/World/PacketContainerRemove.hpp" -#include "../Packets/World/PacketDoorActivate.hpp" +#include "../Packets/World/PacketDoorState.hpp" #include "../Packets/World/PacketMusicPlay.hpp" #include "../Packets/World/PacketVideoPlay.hpp" @@ -45,7 +45,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); diff --git a/components/openmw-mp/NetworkMessages.hpp b/components/openmw-mp/NetworkMessages.hpp index 386362a44..b3d52ad3c 100644 --- a/components/openmw-mp/NetworkMessages.hpp +++ b/components/openmw-mp/NetworkMessages.hpp @@ -50,7 +50,7 @@ enum GameMessages ID_CONTAINER_ADD, ID_CONTAINER_REMOVE, - ID_DOOR_ACTIVATE, + ID_DOOR_STATE, ID_MUSIC_PLAY, ID_VIDEO_PLAY, diff --git a/components/openmw-mp/Packets/World/PacketDoorActivate.hpp b/components/openmw-mp/Packets/World/PacketDoorActivate.hpp deleted file mode 100644 index bb9993cb8..000000000 --- a/components/openmw-mp/Packets/World/PacketDoorActivate.hpp +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef OPENMW_PACKETDOORACTIVATE_HPP -#define OPENMW_PACKETDOORACTIVATE_HPP - -#include - -namespace mwmp -{ - class PacketDoorActivate : public WorldPacket - { - public: - PacketDoorActivate(RakNet::RakPeerInterface *peer); - - virtual void Packet(RakNet::BitStream *bs, WorldEvent *event, bool send); - }; -} - -#endif //OPENMW_PACKETDOORACTIVATE_HPP diff --git a/components/openmw-mp/Packets/World/PacketDoorActivate.cpp b/components/openmw-mp/Packets/World/PacketDoorState.cpp similarity index 78% rename from components/openmw-mp/Packets/World/PacketDoorActivate.cpp rename to components/openmw-mp/Packets/World/PacketDoorState.cpp index e761e79a9..61e0e060d 100644 --- a/components/openmw-mp/Packets/World/PacketDoorActivate.cpp +++ b/components/openmw-mp/Packets/World/PacketDoorState.cpp @@ -1,14 +1,14 @@ #include -#include "PacketDoorActivate.hpp" +#include "PacketDoorState.hpp" using namespace mwmp; -PacketDoorActivate::PacketDoorActivate(RakNet::RakPeerInterface *peer) : WorldPacket(peer) +PacketDoorState::PacketDoorState(RakNet::RakPeerInterface *peer) : WorldPacket(peer) { - packetID = ID_DOOR_ACTIVATE; + packetID = ID_DOOR_STATE; } -void PacketDoorActivate::Packet(RakNet::BitStream *bs, WorldEvent *event, bool send) +void PacketDoorState::Packet(RakNet::BitStream *bs, WorldEvent *event, bool send) { WorldPacket::Packet(bs, event, send); diff --git a/components/openmw-mp/Packets/World/PacketDoorState.hpp b/components/openmw-mp/Packets/World/PacketDoorState.hpp new file mode 100644 index 000000000..5e354d13c --- /dev/null +++ b/components/openmw-mp/Packets/World/PacketDoorState.hpp @@ -0,0 +1,17 @@ +#ifndef OPENMW_PACKETDOORSTATE_HPP +#define OPENMW_PACKETDOORSTATE_HPP + +#include + +namespace mwmp +{ + class PacketDoorState : public WorldPacket + { + public: + PacketDoorState(RakNet::RakPeerInterface *peer); + + virtual void Packet(RakNet::BitStream *bs, WorldEvent *event, bool send); + }; +} + +#endif //OPENMW_PACKETDOORSTATE_HPP