From 08de349133d2b6fb54b95d894f61e62964e68c06 Mon Sep 17 00:00:00 2001 From: David Cernat Date: Wed, 24 May 2017 19:01:28 +0300 Subject: [PATCH] [General] Add placeholders for PlayerTopic & ObjectTrap packets --- apps/openmw-mp/CMakeLists.txt | 8 ++-- apps/openmw-mp/ProcessorInitializer.cpp | 4 ++ apps/openmw-mp/Script/ScriptFunctions.hpp | 14 +++--- .../player/ProcessorPlayerTopic.hpp | 28 ++++++++++++ .../processors/world/ProcessorObjectTrap.hpp | 27 +++++++++++ apps/openmw/CMakeLists.txt | 4 +- apps/openmw/mwmp/ProcessorInitializer.cpp | 4 ++ .../player/ProcessorPlayerTopic.hpp | 30 +++++++++++++ .../processors/world/ProcessorObjectTrap.hpp | 26 +++++++++++ components/CMakeLists.txt | 6 +-- .../Controllers/PlayerPacketController.cpp | 2 + .../Controllers/WorldPacketController.cpp | 16 ++++--- components/openmw-mp/NetworkMessages.hpp | 10 +++-- .../Packets/Player/PacketPlayerTopic.cpp | 15 +++++++ .../Packets/Player/PacketPlayerTopic.hpp | 18 ++++++++ .../Packets/World/PacketObjectTrap.cpp | 45 +++++++++++++++++++ .../Packets/World/PacketObjectTrap.hpp | 17 +++++++ 17 files changed, 248 insertions(+), 26 deletions(-) create mode 100644 apps/openmw-mp/processors/player/ProcessorPlayerTopic.hpp create mode 100644 apps/openmw-mp/processors/world/ProcessorObjectTrap.hpp create mode 100644 apps/openmw/mwmp/processors/player/ProcessorPlayerTopic.hpp create mode 100644 apps/openmw/mwmp/processors/world/ProcessorObjectTrap.hpp create mode 100644 components/openmw-mp/Packets/Player/PacketPlayerTopic.cpp create mode 100644 components/openmw-mp/Packets/Player/PacketPlayerTopic.hpp create mode 100644 components/openmw-mp/Packets/World/PacketObjectTrap.cpp create mode 100644 components/openmw-mp/Packets/World/PacketObjectTrap.hpp diff --git a/apps/openmw-mp/CMakeLists.txt b/apps/openmw-mp/CMakeLists.txt index 4304c3b09..0021e0936 100644 --- a/apps/openmw-mp/CMakeLists.txt +++ b/apps/openmw-mp/CMakeLists.txt @@ -123,7 +123,7 @@ set(PROCESSORS_PLAYER processors/player/ProcessorPlayerJournal.hpp processors/player/ProcessorPlayerLevel.hpp processors/player/ProcessorPlayerPosition.hpp processors/player/ProcessorPlayerResurrect.hpp processors/player/ProcessorPlayerSkill.hpp processors/player/ProcessorPlayerSpellbook.hpp - processors/player/ProcessorPlayerStatsDynamic.hpp + processors/player/ProcessorPlayerStatsDynamic.hpp processors/player/ProcessorPlayerTopic.hpp ) source_group(tes3mp-server\\processors\\player FILES ${PROCESSORS_PLAYER}) @@ -134,9 +134,9 @@ set(PROCESSORS_WORLD processors/world/ProcessorObjectDelete.hpp processors/world/ProcessorObjectLock.hpp processors/world/ProcessorObjectMove.hpp processors/world/ProcessorObjectPlace.hpp processors/world/ProcessorObjectRotate.hpp processors/world/ProcessorObjectScale.hpp - processors/world/ProcessorScriptGlobalShort.hpp processors/world/ProcessorScriptLocalFloat.hpp - processors/world/ProcessorScriptLocalShort.hpp processors/world/ProcessorScriptMemberShort.hpp - processors/world/ProcessorVideoPlay.hpp + processors/world/ProcessorObjectTrap.hpp processors/world/ProcessorScriptLocalShort.hpp + processors/world/ProcessorScriptLocalFloat.hpp processors/world/ProcessorScriptMemberShort.hpp + processors/world/ProcessorScriptGlobalShort.hpp processors/world/ProcessorVideoPlay.hpp ) source_group(tes3mp-server\\processors\\world FILES ${PROCESSORS_WORLD}) diff --git a/apps/openmw-mp/ProcessorInitializer.cpp b/apps/openmw-mp/ProcessorInitializer.cpp index f5ddfbdf7..39e20950d 100644 --- a/apps/openmw-mp/ProcessorInitializer.cpp +++ b/apps/openmw-mp/ProcessorInitializer.cpp @@ -29,6 +29,7 @@ #include "processors/player/ProcessorPlayerSkill.hpp" #include "processors/player/ProcessorPlayerSpellbook.hpp" #include "processors/player/ProcessorPlayerStatsDynamic.hpp" +#include "processors/player/ProcessorPlayerTopic.hpp" #include "ActorProcessor.hpp" #include "processors/actor/ProcessorActorList.hpp" #include "processors/actor/ProcessorActorAuthority.hpp" @@ -52,6 +53,7 @@ #include "processors/world/ProcessorObjectMove.hpp" #include "processors/world/ProcessorObjectRotate.hpp" #include "processors/world/ProcessorObjectScale.hpp" +#include "processors/world/ProcessorObjectTrap.hpp" #include "processors/world/ProcessorScriptLocalShort.hpp" #include "processors/world/ProcessorScriptLocalFloat.hpp" #include "processors/world/ProcessorScriptMemberShort.hpp" @@ -84,6 +86,7 @@ void ProcessorInitializer() PlayerProcessor::AddProcessor(new ProcessorPlayerSkill()); PlayerProcessor::AddProcessor(new ProcessorPlayerSpellbook()); PlayerProcessor::AddProcessor(new ProcessorPlayerStatsDynamic()); + PlayerProcessor::AddProcessor(new ProcessorPlayerTopic()); ActorProcessor::AddProcessor(new ProcessorActorList()); ActorProcessor::AddProcessor(new ProcessorActorAuthority()); @@ -107,6 +110,7 @@ void ProcessorInitializer() WorldProcessor::AddProcessor(new ProcessorObjectPlace()); WorldProcessor::AddProcessor(new ProcessorObjectRotate()); WorldProcessor::AddProcessor(new ProcessorObjectScale()); + WorldProcessor::AddProcessor(new ProcessorObjectTrap()); WorldProcessor::AddProcessor(new ProcessorScriptLocalShort()); WorldProcessor::AddProcessor(new ProcessorScriptLocalFloat()); WorldProcessor::AddProcessor(new ProcessorScriptMemberShort()); diff --git a/apps/openmw-mp/Script/ScriptFunctions.hpp b/apps/openmw-mp/Script/ScriptFunctions.hpp index 1787aae7a..7a0f7e47c 100644 --- a/apps/openmw-mp/Script/ScriptFunctions.hpp +++ b/apps/openmw-mp/Script/ScriptFunctions.hpp @@ -131,18 +131,20 @@ public: {"OnPlayerJournal", Function()}, {"OnPlayerFaction", Function()}, {"OnPlayerSpellbook", Function()}, + {"OnPlayerTopic", Function()}, {"OnCellLoad", Function()}, {"OnCellUnload", Function()}, {"OnCellDeletion", Function()}, + {"OnContainer", Function()}, + {"OnDoorState", Function()}, + {"OnObjectDelete", Function()}, + {"OnObjectLock", Function()}, + {"OnObjectPlace", Function()}, + {"OnObjectScale", Function()}, + {"OnObjectTrap", Function()}, {"OnActorList", Function()}, {"OnActorCellChange", Function()}, {"OnActorTest", Function()}, - {"OnObjectPlace", Function()}, - {"OnObjectDelete", Function()}, - {"OnObjectScale", Function()}, - {"OnObjectLock", Function()}, - {"OnDoorState", Function()}, - {"OnContainer", Function()}, {"OnPlayerSendMessage", Function()}, {"OnPlayerEndCharGen", Function()}, {"OnGUIAction", Function()}, diff --git a/apps/openmw-mp/processors/player/ProcessorPlayerTopic.hpp b/apps/openmw-mp/processors/player/ProcessorPlayerTopic.hpp new file mode 100644 index 000000000..1518cdea9 --- /dev/null +++ b/apps/openmw-mp/processors/player/ProcessorPlayerTopic.hpp @@ -0,0 +1,28 @@ +#ifndef OPENMW_PROCESSORPLAYERTOPIC_HPP +#define OPENMW_PROCESSORPLAYERTOPIC_HPP + + +#include "apps/openmw-mp/PlayerProcessor.hpp" + +namespace mwmp +{ + class ProcessorPlayerTopic : public PlayerProcessor + { + public: + ProcessorPlayerTopic() + { + BPP_INIT(ID_PLAYER_TOPIC) + } + + void Do(PlayerPacket &packet, Player &player) override + { + DEBUG_PRINTF(strPacketID.c_str()); + + packet.Send(true); + + Script::Call(player.getId()); + } + }; +} + +#endif //OPENMW_PROCESSORPLAYERTOPIC_HPP diff --git a/apps/openmw-mp/processors/world/ProcessorObjectTrap.hpp b/apps/openmw-mp/processors/world/ProcessorObjectTrap.hpp new file mode 100644 index 000000000..963cac8b0 --- /dev/null +++ b/apps/openmw-mp/processors/world/ProcessorObjectTrap.hpp @@ -0,0 +1,27 @@ +#ifndef OPENMW_PROCESSOROBJECTTRAP_HPP +#define OPENMW_PROCESSOROBJECTTRAP_HPP + +#include "apps/openmw-mp/WorldProcessor.hpp" + +namespace mwmp +{ + class ProcessorObjectTrap : public WorldProcessor + { + public: + ProcessorObjectTrap() + { + BPP_INIT(ID_OBJECT_TRAP) + } + + void Do(WorldPacket &packet, Player &player, BaseEvent &event) override + { + LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Received %s from %s", strPacketID.c_str(), player.npc.mName.c_str()); + + packet.Send(true); + + Script::Call(player.getId(), event.cell.getDescription().c_str()); + } + }; +} + +#endif //OPENMW_PROCESSOROBJECTTRAP_HPP diff --git a/apps/openmw/CMakeLists.txt b/apps/openmw/CMakeLists.txt index c346794c8..52fe4c33e 100644 --- a/apps/openmw/CMakeLists.txt +++ b/apps/openmw/CMakeLists.txt @@ -111,12 +111,12 @@ add_openmw_dir (mwmp\\processors\\player ProcessorChatMessage ProcessorGameConso ProcessorPlayerAttack ProcessorPlayerAttribute ProcessorPlayerBounty ProcessorPlayerCellChange ProcessorPlayerCellState ProcessorPlayerCharClass ProcessorPlayerCharGen ProcessorPlayerDeath ProcessorPlayerEquipment ProcessorPlayerFaction ProcessorPlayerInventory ProcessorPlayerJournal ProcessorPlayerLevel ProcessorPlayerPosition ProcessorPlayerResurrect - ProcessorPlayerSkill ProcessorPlayerSpellbook ProcessorPlayerStatsDynamic + ProcessorPlayerSkill ProcessorPlayerSpellbook ProcessorPlayerStatsDynamic ProcessorPlayerTopic ) add_openmw_dir (mwmp\\processors\\world BaseObjectProcessor ProcessorContainer ProcessorDoorState ProcessorMusicPlay ProcessorObjectAnimPlay ProcessorObjectDelete ProcessorObjectLock ProcessorObjectMove ProcessorObjectPlace - ProcessorObjectRotate ProcessorObjectScale ProcessorScriptGlobalShort ProcessorScriptLocalFloat + ProcessorObjectRotate ProcessorObjectScale ProcessorObjectTrap ProcessorScriptGlobalShort ProcessorScriptLocalFloat ProcessorScriptLocalShort ProcessorScriptMemberShort ProcessorVideoPlay ) diff --git a/apps/openmw/mwmp/ProcessorInitializer.cpp b/apps/openmw/mwmp/ProcessorInitializer.cpp index 481afceab..62463aeb1 100644 --- a/apps/openmw/mwmp/ProcessorInitializer.cpp +++ b/apps/openmw/mwmp/ProcessorInitializer.cpp @@ -33,6 +33,7 @@ #include "processors/player/ProcessorPlayerSkill.hpp" #include "processors/player/ProcessorPlayerSpellbook.hpp" #include "processors/player/ProcessorPlayerStatsDynamic.hpp" +#include "processors/player/ProcessorPlayerTopic.hpp" #include "WorldProcessor.hpp" #include "processors/world/ProcessorContainer.hpp" @@ -45,6 +46,7 @@ #include "processors/world/ProcessorObjectPlace.hpp" #include "processors/world/ProcessorObjectRotate.hpp" #include "processors/world/ProcessorObjectScale.hpp" +#include "processors/world/ProcessorObjectTrap.hpp" #include "processors/world/ProcessorScriptLocalShort.hpp" #include "processors/world/ProcessorScriptLocalFloat.hpp" #include "processors/world/ProcessorScriptMemberShort.hpp" @@ -94,6 +96,7 @@ void ProcessorInitializer() PlayerProcessor::AddProcessor(new ProcessorPlayerSkill()); PlayerProcessor::AddProcessor(new ProcessorPlayerSpellbook()); PlayerProcessor::AddProcessor(new ProcessorPlayerStatsDynamic()); + PlayerProcessor::AddProcessor(new ProcessorPlayerTopic()); WorldProcessor::AddProcessor(new ProcessorContainer()); WorldProcessor::AddProcessor(new ProcessorDoorState()); @@ -105,6 +108,7 @@ void ProcessorInitializer() WorldProcessor::AddProcessor(new ProcessorObjectPlace()); WorldProcessor::AddProcessor(new ProcessorObjectRotate()); WorldProcessor::AddProcessor(new ProcessorObjectScale()); + WorldProcessor::AddProcessor(new ProcessorObjectTrap()); WorldProcessor::AddProcessor(new ProcessorScriptLocalShort()); WorldProcessor::AddProcessor(new ProcessorScriptLocalFloat()); WorldProcessor::AddProcessor(new ProcessorScriptMemberShort()); diff --git a/apps/openmw/mwmp/processors/player/ProcessorPlayerTopic.hpp b/apps/openmw/mwmp/processors/player/ProcessorPlayerTopic.hpp new file mode 100644 index 000000000..320d87f62 --- /dev/null +++ b/apps/openmw/mwmp/processors/player/ProcessorPlayerTopic.hpp @@ -0,0 +1,30 @@ +#ifndef OPENMW_PROCESSORPLAYERTOPIC_HPP +#define OPENMW_PROCESSORPLAYERTOPIC_HPP + + +#include "apps/openmw/mwmp/PlayerProcessor.hpp" + +namespace mwmp +{ + class ProcessorPlayerTopic : public PlayerProcessor + { + public: + ProcessorPlayerTopic() + { + BPP_INIT(ID_PLAYER_TOPIC) + } + + virtual void Do(PlayerPacket &packet, BasePlayer *player) + { + if (isRequest()) + { + // Entire list of topics cannot currently be requested from players + } + //else + //static_cast(player)->addTopics(); + } + }; +} + + +#endif //OPENMW_PROCESSORPLAYERTOPIC_HPP diff --git a/apps/openmw/mwmp/processors/world/ProcessorObjectTrap.hpp b/apps/openmw/mwmp/processors/world/ProcessorObjectTrap.hpp new file mode 100644 index 000000000..a52839992 --- /dev/null +++ b/apps/openmw/mwmp/processors/world/ProcessorObjectTrap.hpp @@ -0,0 +1,26 @@ +#ifndef OPENMW_PROCESSOROBJECTTRAP_HPP +#define OPENMW_PROCESSOROBJECTTRAP_HPP + + +#include "BaseObjectProcessor.hpp" + +namespace mwmp +{ + class ProcessorObjectTrap : public BaseObjectProcessor + { + public: + ProcessorObjectTrap() + { + BPP_INIT(ID_OBJECT_TRAP) + } + + virtual void Do(WorldPacket &packet, WorldEvent &event) + { + BaseObjectProcessor::Do(packet, event); + + //event.setObjectTraps(ptrCellStore); + } + }; +} + +#endif //OPENMW_PROCESSOROBJECTTRAP_HPP diff --git a/components/CMakeLists.txt b/components/CMakeLists.txt index b26786d69..628702c1d 100644 --- a/components/CMakeLists.txt +++ b/components/CMakeLists.txt @@ -179,13 +179,13 @@ add_component_dir (openmw-mp\\Packets\\Player PacketPlayerAttribute PacketPlayerBounty PacketPlayerCellChange PacketPlayerCellState PacketPlayerClass PacketPlayerDeath PacketPlayerEquipment PacketPlayerFaction PacketPlayerInventory PacketPlayerJournal PacketPlayerLevel PacketPlayerPosition PacketPlayerResurrect PacketPlayerSkill PacketPlayerSpellbook PacketPlayerStatsDynamic - PacketPlayerActiveSkills PacketGUIBoxes PacketTime + PacketPlayerTopic PacketPlayerActiveSkills PacketGUIBoxes PacketTime ) add_component_dir (openmw-mp\\Packets\\World WorldPacket - PacketObjectDelete PacketObjectPlace PacketObjectScale PacketObjectLock PacketObjectMove PacketObjectRotate - PacketObjectAnimPlay PacketContainer PacketDoorState PacketMusicPlay PacketVideoPlay PacketScriptLocalShort + PacketContainer PacketObjectAnimPlay PacketObjectDelete PacketDoorState PacketObjectLock PacketObjectMove PacketObjectPlace + PacketObjectRotate PacketObjectScale PacketObjectTrap PacketMusicPlay PacketVideoPlay PacketScriptLocalShort PacketScriptLocalFloat PacketScriptMemberShort PacketScriptGlobalShort ) diff --git a/components/openmw-mp/Controllers/PlayerPacketController.cpp b/components/openmw-mp/Controllers/PlayerPacketController.cpp index b9552ccea..9448bec26 100644 --- a/components/openmw-mp/Controllers/PlayerPacketController.cpp +++ b/components/openmw-mp/Controllers/PlayerPacketController.cpp @@ -31,6 +31,7 @@ #include "../Packets/Player/PacketPlayerSkill.hpp" #include "../Packets/Player/PacketPlayerSpellbook.hpp" #include "../Packets/Player/PacketPlayerStatsDynamic.hpp" +#include "../Packets/Player/PacketPlayerTopic.hpp" #include "PlayerPacketController.hpp" @@ -74,6 +75,7 @@ mwmp::PlayerPacketController::PlayerPacketController(RakNet::RakPeerInterface *p AddPacket(&packets, peer); AddPacket(&packets, peer); AddPacket(&packets, peer); + AddPacket(&packets, peer); } diff --git a/components/openmw-mp/Controllers/WorldPacketController.cpp b/components/openmw-mp/Controllers/WorldPacketController.cpp index 065fb19ed..05ff4361b 100644 --- a/components/openmw-mp/Controllers/WorldPacketController.cpp +++ b/components/openmw-mp/Controllers/WorldPacketController.cpp @@ -2,13 +2,14 @@ #include #include +#include "../Packets/World/PacketObjectAnimPlay.hpp" #include "../Packets/World/PacketObjectDelete.hpp" -#include "../Packets/World/PacketObjectPlace.hpp" -#include "../Packets/World/PacketObjectScale.hpp" #include "../Packets/World/PacketObjectLock.hpp" #include "../Packets/World/PacketObjectMove.hpp" +#include "../Packets/World/PacketObjectPlace.hpp" #include "../Packets/World/PacketObjectRotate.hpp" -#include "../Packets/World/PacketObjectAnimPlay.hpp" +#include "../Packets/World/PacketObjectScale.hpp" +#include "../Packets/World/PacketObjectTrap.hpp" #include "../Packets/World/PacketContainer.hpp" #include "../Packets/World/PacketDoorState.hpp" @@ -32,14 +33,15 @@ inline void AddPacket(mwmp::WorldPacketController::packets_t *packets, RakNet::R mwmp::WorldPacketController::WorldPacketController(RakNet::RakPeerInterface *peer) { + AddPacket(&packets, peer); AddPacket(&packets, peer); - AddPacket(&packets, peer); - AddPacket(&packets, peer); AddPacket(&packets, peer); AddPacket(&packets, peer); + AddPacket(&packets, peer); 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 914014e21..f27ae5260 100644 --- a/components/openmw-mp/NetworkMessages.hpp +++ b/components/openmw-mp/NetworkMessages.hpp @@ -40,6 +40,7 @@ enum GameMessages ID_PLAYER_SKILL, ID_PLAYER_SPELLBOOK, ID_PLAYER_STATS_DYNAMIC, + ID_PLAYER_TOPIC, ID_ACTOR_LIST, ID_ACTOR_AUTHORITY, @@ -53,14 +54,15 @@ enum GameMessages ID_ACTOR_SPEECH, ID_ACTOR_STATS_DYNAMIC, - ID_OBJECT_PLACE, + ID_OBJECT_ANIM_PLAY, ID_OBJECT_DELETE, - ID_OBJECT_SCALE, ID_OBJECT_LOCK, ID_OBJECT_MOVE, + ID_OBJECT_PLACE, ID_OBJECT_ROTATE, - ID_OBJECT_ANIM_PLAY, - + ID_OBJECT_SCALE, + ID_OBJECT_TRAP, + ID_CONTAINER, ID_DOOR_STATE, ID_MUSIC_PLAY, diff --git a/components/openmw-mp/Packets/Player/PacketPlayerTopic.cpp b/components/openmw-mp/Packets/Player/PacketPlayerTopic.cpp new file mode 100644 index 000000000..f56c7ceae --- /dev/null +++ b/components/openmw-mp/Packets/Player/PacketPlayerTopic.cpp @@ -0,0 +1,15 @@ +#include +#include "PacketPlayerTopic.hpp" + +using namespace std; +using namespace mwmp; + +PacketPlayerTopic::PacketPlayerTopic(RakNet::RakPeerInterface *peer) : PlayerPacket(peer) +{ + packetID = ID_PLAYER_TOPIC; +} + +void PacketPlayerTopic::Packet(RakNet::BitStream *bs, bool send) +{ + PlayerPacket::Packet(bs, send); +} diff --git a/components/openmw-mp/Packets/Player/PacketPlayerTopic.hpp b/components/openmw-mp/Packets/Player/PacketPlayerTopic.hpp new file mode 100644 index 000000000..8db8b0048 --- /dev/null +++ b/components/openmw-mp/Packets/Player/PacketPlayerTopic.hpp @@ -0,0 +1,18 @@ +#ifndef OPENMW_PACKETPLAYERTOPIC_HPP +#define OPENMW_PACKETPLAYERTOPIC_HPP + +#include + +namespace mwmp +{ + class PacketPlayerTopic : public PlayerPacket + { + public: + PacketPlayerTopic(RakNet::RakPeerInterface *peer); + + virtual void Packet(RakNet::BitStream *bs, bool send); + }; +} + + +#endif //OPENMW_PACKETPLAYERTOPIC_HPP diff --git a/components/openmw-mp/Packets/World/PacketObjectTrap.cpp b/components/openmw-mp/Packets/World/PacketObjectTrap.cpp new file mode 100644 index 000000000..c209d0198 --- /dev/null +++ b/components/openmw-mp/Packets/World/PacketObjectTrap.cpp @@ -0,0 +1,45 @@ +#include +#include "PacketObjectTrap.hpp" + +using namespace mwmp; + +PacketObjectTrap::PacketObjectTrap(RakNet::RakPeerInterface *peer) : WorldPacket(peer) +{ + packetID = ID_OBJECT_TRAP; +} + +void PacketObjectTrap::Packet(RakNet::BitStream *bs, bool send) +{ + WorldPacket::Packet(bs, send); + + if (!send) + event->worldObjects.clear(); + else + event->worldObjectCount = (unsigned int)(event->worldObjects.size()); + + RW(event->worldObjectCount, send); + + RW(event->cell.mData.mFlags, send); + RW(event->cell.mData.mX, send); + RW(event->cell.mData.mY, send); + RW(event->cell.mName, send); + + WorldObject worldObject; + + for (unsigned int i = 0; i < event->worldObjectCount; i++) + { + if (send) + { + worldObject = event->worldObjects.at(i); + } + + RW(worldObject.refId, send); + RW(worldObject.refNumIndex, send); + RW(worldObject.mpNum, send); + + if (!send) + { + event->worldObjects.push_back(worldObject); + } + } +} diff --git a/components/openmw-mp/Packets/World/PacketObjectTrap.hpp b/components/openmw-mp/Packets/World/PacketObjectTrap.hpp new file mode 100644 index 000000000..0031204cf --- /dev/null +++ b/components/openmw-mp/Packets/World/PacketObjectTrap.hpp @@ -0,0 +1,17 @@ +#ifndef OPENMW_PACKETOBJECTTRAP_HPP +#define OPENMW_PACKETOBJECTTRAP_HPP + +#include + +namespace mwmp +{ + class PacketObjectTrap : public WorldPacket + { + public: + PacketObjectTrap(RakNet::RakPeerInterface *peer); + + virtual void Packet(RakNet::BitStream *bs, bool send); + }; +} + +#endif //OPENMW_PACKETOBJECTTRAP_HPP