diff --git a/apps/openmw-mp/Cell.cpp b/apps/openmw-mp/Cell.cpp index 9c54a9602..90335695f 100644 --- a/apps/openmw-mp/Cell.cpp +++ b/apps/openmw-mp/Cell.cpp @@ -202,7 +202,7 @@ void Cell::sendToLoaded(mwmp::ActorPacket *actorPacket, mwmp::BaseActorList *bas } } -void Cell::sendToLoaded(mwmp::WorldPacket *worldPacket, mwmp::BaseEvent *baseEvent) const +void Cell::sendToLoaded(mwmp::ObjectPacket *objectPacket, mwmp::BaseEvent *baseEvent) const { if (players.empty()) return; @@ -222,10 +222,10 @@ void Cell::sendToLoaded(mwmp::WorldPacket *worldPacket, mwmp::BaseEvent *baseEve { if (pl->guid == baseEvent->guid) continue; - worldPacket->setEvent(baseEvent); + objectPacket->setEvent(baseEvent); // Send the packet to this eligible guid - worldPacket->Send(pl->guid); + objectPacket->Send(pl->guid); } } diff --git a/apps/openmw-mp/Cell.hpp b/apps/openmw-mp/Cell.hpp index 8b2748dcf..599d03627 100644 --- a/apps/openmw-mp/Cell.hpp +++ b/apps/openmw-mp/Cell.hpp @@ -11,7 +11,7 @@ #include #include #include -#include +#include class Player; class Cell; @@ -41,7 +41,7 @@ public: TPlayers getPlayers() const; void sendToLoaded(mwmp::ActorPacket *actorPacket, mwmp::BaseActorList *baseActorList) const; - void sendToLoaded(mwmp::WorldPacket *worldPacket, mwmp::BaseEvent *baseEvent) const; + void sendToLoaded(mwmp::ObjectPacket *objectPacket, mwmp::BaseEvent *baseEvent) const; std::string getDescription() const; diff --git a/apps/openmw-mp/CellController.hpp b/apps/openmw-mp/CellController.hpp index b7d60c7ab..f15227d68 100644 --- a/apps/openmw-mp/CellController.hpp +++ b/apps/openmw-mp/CellController.hpp @@ -6,7 +6,7 @@ #include #include #include -#include +#include class Player; class Cell; diff --git a/apps/openmw-mp/Networking.cpp b/apps/openmw-mp/Networking.cpp index 5c2dd0bf1..5453c6a41 100644 --- a/apps/openmw-mp/Networking.cpp +++ b/apps/openmw-mp/Networking.cpp @@ -43,12 +43,12 @@ Networking::Networking(RakNet::RakPeerInterface *peer) : mclient(nullptr) playerPacketController = make_unique(peer); actorPacketController = make_unique(peer); - worldPacketController = make_unique(peer); + objectPacketController = make_unique(peer); // Set send stream playerPacketController->SetStream(nullptr, &bsOut); actorPacketController->SetStream(nullptr, &bsOut); - worldPacketController->SetStream(nullptr, &bsOut); + objectPacketController->SetStream(nullptr, &bsOut); running = true; exitCode = 0; @@ -171,7 +171,7 @@ void Networking::processActorPacket(RakNet::Packet *packet) } -void Networking::processWorldPacket(RakNet::Packet *packet) +void Networking::processObjectPacket(RakNet::Packet *packet) { auto player = Players::getPlayerByGUID(packet->guid); @@ -179,7 +179,7 @@ void Networking::processWorldPacket(RakNet::Packet *packet) return; if (!WorldProcessor::Process(*packet, baseEvent)) - LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Unhandled WorldPacket with identifier %i has arrived", (int) packet->data[0]); + LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Unhandled ObjectPacket with identifier %i has arrived", (int) packet->data[0]); } @@ -264,10 +264,10 @@ bool Networking::update(RakNet::Packet *packet) actorPacketController->SetStream(&bsIn, nullptr); processActorPacket(packet); } - else if (worldPacketController->ContainsPacket(packet->data[0])) + else if (objectPacketController->ContainsPacket(packet->data[0])) { - worldPacketController->SetStream(&bsIn, nullptr); - processWorldPacket(packet); + objectPacketController->SetStream(&bsIn, nullptr); + processObjectPacket(packet); } else { @@ -343,9 +343,9 @@ ActorPacketController *Networking::getActorPacketController() const return actorPacketController.get(); } -WorldPacketController *Networking::getWorldPacketController() const +ObjectPacketController *Networking::getObjectPacketController() const { - return worldPacketController.get(); + return objectPacketController.get(); } BaseActorList *Networking::getLastActorList() diff --git a/apps/openmw-mp/Networking.hpp b/apps/openmw-mp/Networking.hpp index 03c6dc7c8..e09a80e6f 100644 --- a/apps/openmw-mp/Networking.hpp +++ b/apps/openmw-mp/Networking.hpp @@ -7,7 +7,7 @@ #include #include -#include +#include #include #include @@ -38,7 +38,7 @@ namespace mwmp void processPlayerPacket(RakNet::Packet *packet); void processActorPacket(RakNet::Packet *packet); - void processWorldPacket(RakNet::Packet *packet); + void processObjectPacket(RakNet::Packet *packet); bool update(RakNet::Packet *packet); unsigned short numberOfConnections() const; @@ -51,7 +51,7 @@ namespace mwmp PlayerPacketController *getPlayerPacketController() const; ActorPacketController *getActorPacketController() const; - WorldPacketController *getWorldPacketController() const; + ObjectPacketController *getObjectPacketController() const; LuaState &getState() {return luaState;} @@ -94,7 +94,7 @@ namespace mwmp std::unique_ptr playerPacketController; std::unique_ptr actorPacketController; - std::unique_ptr worldPacketController; + std::unique_ptr objectPacketController; bool running; int exitCode; diff --git a/apps/openmw-mp/Object.cpp b/apps/openmw-mp/Object.cpp index e22c4be3c..0f8739108 100644 --- a/apps/openmw-mp/Object.cpp +++ b/apps/openmw-mp/Object.cpp @@ -438,7 +438,7 @@ void ObjectController::sendObjects(shared_ptr player, shared_ptr player, shared_ptr< for (auto &object : *objects) event.worldObjects.push_back(object->object); - auto packet = mwmp::Networking::get().getWorldPacketController()->GetPacket(ID_CONSOLE_COMMAND); + auto packet = mwmp::Networking::get().getObjectPacketController()->GetPacket(ID_CONSOLE_COMMAND); packet->setEvent(&event); packet->Send(false); @@ -568,7 +568,7 @@ void ObjectController::sendContainers(shared_ptr player, shared_ptrobject); } - auto packet = mwmp::Networking::get().getWorldPacketController()->GetPacket(ID_CONTAINER); + auto packet = mwmp::Networking::get().getObjectPacketController()->GetPacket(ID_CONTAINER); packet->setEvent(&event); packet->Send(false); @@ -583,7 +583,7 @@ void ObjectController::requestContainers(shared_ptr player) event.guid = player->guid; event.cell = player->cell; - auto packet = mwmp::Networking::get().getWorldPacketController()->GetPacket(ID_CONTAINER); + auto packet = mwmp::Networking::get().getObjectPacketController()->GetPacket(ID_CONTAINER); packet->setEvent(&event); packet->Send(event.guid); } diff --git a/apps/openmw-mp/processors/WorldProcessor.cpp b/apps/openmw-mp/processors/WorldProcessor.cpp index 53ade2cdf..4e431afc8 100644 --- a/apps/openmw-mp/processors/WorldProcessor.cpp +++ b/apps/openmw-mp/processors/WorldProcessor.cpp @@ -10,7 +10,7 @@ using namespace mwmp; template typename BasePacketProcessor::processors_t BasePacketProcessor::processors; -void WorldProcessor::Do(WorldPacket &packet, const std::shared_ptr &player, BaseEvent &event) +void WorldProcessor::Do(ObjectPacket &packet, const std::shared_ptr &player, BaseEvent &event) { packet.Send(true); } @@ -27,7 +27,7 @@ bool WorldProcessor::Process(RakNet::Packet &packet, BaseEvent &event) noexcept if (processor.first == packet.data[0]) { auto player = Players::getPlayerByGUID(packet.guid); - WorldPacket *myPacket = Networking::get().getWorldPacketController()->GetPacket(packet.data[0]); + ObjectPacket *myPacket = Networking::get().getObjectPacketController()->GetPacket(packet.data[0]); myPacket->setEvent(&event); event.isValid = true; diff --git a/apps/openmw-mp/processors/WorldProcessor.hpp b/apps/openmw-mp/processors/WorldProcessor.hpp index 0eb23bbb1..8071f6061 100644 --- a/apps/openmw-mp/processors/WorldProcessor.hpp +++ b/apps/openmw-mp/processors/WorldProcessor.hpp @@ -8,7 +8,7 @@ #include #include -#include +#include #include #include "Players.hpp" @@ -18,7 +18,7 @@ namespace mwmp { public: - virtual void Do(WorldPacket &packet, const std::shared_ptr &player, BaseEvent &event); + virtual void Do(ObjectPacket &packet, const std::shared_ptr &player, BaseEvent &event); static bool Process(RakNet::Packet &packet, BaseEvent &event) noexcept; }; diff --git a/apps/openmw-mp/processors/world/ProcessorContainer.hpp b/apps/openmw-mp/processors/world/ProcessorContainer.hpp index f5398eae0..944c19be7 100644 --- a/apps/openmw-mp/processors/world/ProcessorContainer.hpp +++ b/apps/openmw-mp/processors/world/ProcessorContainer.hpp @@ -15,7 +15,7 @@ namespace mwmp BPP_INIT(ID_CONTAINER) } - void Do(WorldPacket &packet, const std::shared_ptr &player, BaseEvent &event) override + void Do(ObjectPacket &packet, const std::shared_ptr &player, BaseEvent &event) override { LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Received %s from %s", strPacketID.c_str(), player->npc.mName.c_str()); LOG_APPEND(Log::LOG_INFO, "- action: %i", (int) event.action); diff --git a/apps/openmw-mp/processors/world/ProcessorDoorState.hpp b/apps/openmw-mp/processors/world/ProcessorDoorState.hpp index 18017f7a2..cf2fa7043 100644 --- a/apps/openmw-mp/processors/world/ProcessorDoorState.hpp +++ b/apps/openmw-mp/processors/world/ProcessorDoorState.hpp @@ -13,7 +13,7 @@ namespace mwmp BPP_INIT(ID_DOOR_STATE) } - void Do(WorldPacket &packet, const std::shared_ptr &player, BaseEvent &event) override + void Do(ObjectPacket &packet, const std::shared_ptr &player, BaseEvent &event) override { packet.Send(true); diff --git a/apps/openmw-mp/processors/world/ProcessorObjectDelete.hpp b/apps/openmw-mp/processors/world/ProcessorObjectDelete.hpp index ab685f35b..dc8e83ac1 100644 --- a/apps/openmw-mp/processors/world/ProcessorObjectDelete.hpp +++ b/apps/openmw-mp/processors/world/ProcessorObjectDelete.hpp @@ -13,7 +13,7 @@ namespace mwmp BPP_INIT(ID_OBJECT_DELETE) } - void Do(WorldPacket &packet, const std::shared_ptr &player, BaseEvent &event) override + void Do(ObjectPacket &packet, const std::shared_ptr &player, BaseEvent &event) override { LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Received %s from %s", strPacketID.c_str(), player->npc.mName.c_str()); diff --git a/apps/openmw-mp/processors/world/ProcessorObjectLock.hpp b/apps/openmw-mp/processors/world/ProcessorObjectLock.hpp index 2028ab9ab..f10740244 100644 --- a/apps/openmw-mp/processors/world/ProcessorObjectLock.hpp +++ b/apps/openmw-mp/processors/world/ProcessorObjectLock.hpp @@ -13,7 +13,7 @@ namespace mwmp BPP_INIT(ID_OBJECT_LOCK) } - void Do(WorldPacket &packet, const std::shared_ptr &player, BaseEvent &event) override + void Do(ObjectPacket &packet, const std::shared_ptr &player, BaseEvent &event) override { LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Received %s from %s", strPacketID.c_str(), player->npc.mName.c_str()); diff --git a/apps/openmw-mp/processors/world/ProcessorObjectPlace.hpp b/apps/openmw-mp/processors/world/ProcessorObjectPlace.hpp index d348f8c62..22b39edbf 100644 --- a/apps/openmw-mp/processors/world/ProcessorObjectPlace.hpp +++ b/apps/openmw-mp/processors/world/ProcessorObjectPlace.hpp @@ -14,7 +14,7 @@ namespace mwmp BPP_INIT(ID_OBJECT_PLACE) } - void Do(WorldPacket &packet, const std::shared_ptr &player, BaseEvent &event) override + void Do(ObjectPacket &packet, const std::shared_ptr &player, BaseEvent &event) override { LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Received %s from %s", strPacketID.c_str(), player->npc.mName.c_str()); diff --git a/apps/openmw-mp/processors/world/ProcessorObjectScale.hpp b/apps/openmw-mp/processors/world/ProcessorObjectScale.hpp index 9216f6ac5..cf5fa21ce 100644 --- a/apps/openmw-mp/processors/world/ProcessorObjectScale.hpp +++ b/apps/openmw-mp/processors/world/ProcessorObjectScale.hpp @@ -13,7 +13,7 @@ namespace mwmp BPP_INIT(ID_OBJECT_SCALE) } - void Do(WorldPacket &packet, const std::shared_ptr &player, BaseEvent &event) override + void Do(ObjectPacket &packet, const std::shared_ptr &player, BaseEvent &event) override { LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Received %s from %s", strPacketID.c_str(), player->npc.mName.c_str()); diff --git a/apps/openmw-mp/processors/world/ProcessorObjectSpawn.hpp b/apps/openmw-mp/processors/world/ProcessorObjectSpawn.hpp index 4b037551b..c49234dfa 100644 --- a/apps/openmw-mp/processors/world/ProcessorObjectSpawn.hpp +++ b/apps/openmw-mp/processors/world/ProcessorObjectSpawn.hpp @@ -14,7 +14,7 @@ namespace mwmp BPP_INIT(ID_OBJECT_SPAWN) } - void Do(WorldPacket &packet, const std::shared_ptr &player, BaseEvent &event) override + void Do(ObjectPacket &packet, const std::shared_ptr &player, BaseEvent &event) override { LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Received %s from %s", strPacketID.c_str(), player->npc.mName.c_str()); diff --git a/apps/openmw-mp/processors/world/ProcessorObjectState.hpp b/apps/openmw-mp/processors/world/ProcessorObjectState.hpp index 10ce5923b..c8a6dbe9f 100644 --- a/apps/openmw-mp/processors/world/ProcessorObjectState.hpp +++ b/apps/openmw-mp/processors/world/ProcessorObjectState.hpp @@ -13,7 +13,7 @@ namespace mwmp BPP_INIT(ID_OBJECT_STATE) } - void Do(WorldPacket &packet, const std::shared_ptr &player, BaseEvent &event) override + void Do(ObjectPacket &packet, const std::shared_ptr &player, BaseEvent &event) override { LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Received %s from %s", strPacketID.c_str(), player->npc.mName.c_str()); diff --git a/apps/openmw-mp/processors/world/ProcessorObjectTrap.hpp b/apps/openmw-mp/processors/world/ProcessorObjectTrap.hpp index 989d28f77..062ca296b 100644 --- a/apps/openmw-mp/processors/world/ProcessorObjectTrap.hpp +++ b/apps/openmw-mp/processors/world/ProcessorObjectTrap.hpp @@ -13,7 +13,7 @@ namespace mwmp BPP_INIT(ID_OBJECT_TRAP) } - void Do(WorldPacket &packet, const std::shared_ptr &player, BaseEvent &event) override + void Do(ObjectPacket &packet, const std::shared_ptr &player, BaseEvent &event) override { LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Received %s from %s", strPacketID.c_str(), player->npc.mName.c_str()); diff --git a/apps/openmw/mwgui/container.cpp b/apps/openmw/mwgui/container.cpp index 24148dba8..5ec9dd1b3 100644 --- a/apps/openmw/mwgui/container.cpp +++ b/apps/openmw/mwgui/container.cpp @@ -124,8 +124,8 @@ namespace MWGui worldEvent->addContainerItem(worldObject, itemPtr, count); worldEvent->worldObjects.push_back(std::move(worldObject)); - mwmp::Main::get().getNetworking()->getWorldPacket(ID_CONTAINER)->setEvent(worldEvent); - mwmp::Main::get().getNetworking()->getWorldPacket(ID_CONTAINER)->Send(); + mwmp::Main::get().getNetworking()->getObjectPacket(ID_CONTAINER)->setEvent(worldEvent); + mwmp::Main::get().getNetworking()->getObjectPacket(ID_CONTAINER)->Send(); LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Sending ID_CONTAINER about\n- Ptr cellRef: %s, %i\n- cell: %s\n- item: %s, %i", worldObject.refId.c_str(), worldObject.refNumIndex, worldEvent->cell.getDescription().c_str(), @@ -179,8 +179,8 @@ namespace MWGui worldObject.containerItems.push_back(std::move(containerItem)); worldEvent->worldObjects.push_back(std::move(worldObject)); - mwmp::Main::get().getNetworking()->getWorldPacket(ID_CONTAINER)->setEvent(worldEvent); - mwmp::Main::get().getNetworking()->getWorldPacket(ID_CONTAINER)->Send(); + mwmp::Main::get().getNetworking()->getObjectPacket(ID_CONTAINER)->setEvent(worldEvent); + mwmp::Main::get().getNetworking()->getObjectPacket(ID_CONTAINER)->Send(); LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Sending ID_CONTAINER about\n- Ptr cellRef: %s, %i\n- cell: %s\n- item: %s, %i, %i", worldObject.refId.c_str(), worldObject.refNumIndex, worldEvent->cell.getDescription().c_str(), @@ -306,8 +306,8 @@ namespace MWGui worldEvent->containerSubAction = mwmp::BaseEvent::ContainerSubAction::TakeAll; worldEvent->addEntireContainer(mPtr); - mwmp::Main::get().getNetworking()->getWorldPacket(ID_CONTAINER)->setEvent(worldEvent); - mwmp::Main::get().getNetworking()->getWorldPacket(ID_CONTAINER)->Send(); + mwmp::Main::get().getNetworking()->getObjectPacket(ID_CONTAINER)->setEvent(worldEvent); + mwmp::Main::get().getNetworking()->getObjectPacket(ID_CONTAINER)->Send(); LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Sending ID_CONTAINER about\n- Ptr cellRef: %s, %i-%i\n- cell: %s", mPtr.getCellRef().getRefId().c_str(), mPtr.getCellRef().getRefNum().mIndex, mPtr.getCellRef().getMpNum(), diff --git a/apps/openmw/mwmp/Networking.cpp b/apps/openmw/mwmp/Networking.cpp index ef13a95b3..833fc33ea 100644 --- a/apps/openmw/mwmp/Networking.cpp +++ b/apps/openmw/mwmp/Networking.cpp @@ -198,7 +198,7 @@ string listComparison(PacketPreInit::PluginContainer checksums, PacketPreInit::P } Networking::Networking(): peer(RakNet::RakPeerInterface::GetInstance()), playerPacketController(peer), - actorPacketController(peer), worldPacketController(peer) + actorPacketController(peer), objectPacketController(peer) { RakNet::SocketDescriptor sd; @@ -208,7 +208,7 @@ Networking::Networking(): peer(RakNet::RakPeerInterface::GetInstance()), playerP playerPacketController.SetStream(0, &bsOut); actorPacketController.SetStream(0, &bsOut); - worldPacketController.SetStream(0, &bsOut); + objectPacketController.SetStream(0, &bsOut); connected = 0; ProcessorInitializer(); @@ -430,10 +430,10 @@ void Networking::receiveMessage(RakNet::Packet *packet) if (!ActorProcessor::Process(*packet, actorList)) LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Unhandled ActorPacket with identifier %i has arrived", (int) packet->data[0]); } - else if (worldPacketController.ContainsPacket(packet->data[0])) + else if (objectPacketController.ContainsPacket(packet->data[0])) { if (!WorldProcessor::Process(*packet, worldEvent)) - LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Unhandled WorldPacket with identifier %i has arrived", (int) packet->data[0]); + LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Unhandled ObjectPacket with identifier %i has arrived", (int) packet->data[0]); } } @@ -447,9 +447,9 @@ ActorPacket *Networking::getActorPacket(RakNet::MessageID id) return actorPacketController.GetPacket(id); } -WorldPacket *Networking::getWorldPacket(RakNet::MessageID id) +ObjectPacket *Networking::getObjectPacket(RakNet::MessageID id) { - return worldPacketController.GetPacket(id); + return objectPacketController.GetPacket(id); } LocalPlayer *Networking::getLocalPlayer() diff --git a/apps/openmw/mwmp/Networking.hpp b/apps/openmw/mwmp/Networking.hpp index 99d202ec8..5a06b027d 100644 --- a/apps/openmw/mwmp/Networking.hpp +++ b/apps/openmw/mwmp/Networking.hpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include @@ -33,7 +33,7 @@ namespace mwmp PlayerPacket *getPlayerPacket(RakNet::MessageID id); ActorPacket *getActorPacket(RakNet::MessageID id); - WorldPacket *getWorldPacket(RakNet::MessageID id); + ObjectPacket *getObjectPacket(RakNet::MessageID id); RakNet::SystemAddress serverAddress() { @@ -56,7 +56,7 @@ namespace mwmp PlayerPacketController playerPacketController; ActorPacketController actorPacketController; - WorldPacketController worldPacketController; + ObjectPacketController objectPacketController; ActorList actorList; WorldEvent worldEvent; diff --git a/apps/openmw/mwmp/WorldEvent.cpp b/apps/openmw/mwmp/WorldEvent.cpp index 1eb5596eb..dab4af091 100644 --- a/apps/openmw/mwmp/WorldEvent.cpp +++ b/apps/openmw/mwmp/WorldEvent.cpp @@ -1025,8 +1025,8 @@ void WorldEvent::sendObjectPlace() for (const auto &worldObject : worldObjects) LOG_APPEND(Log::LOG_VERBOSE, "- cellRef: %s, count: %i", worldObject.refId.c_str(), worldObject.count); - mwmp::Main::get().getNetworking()->getWorldPacket(ID_OBJECT_PLACE)->setEvent(this); - mwmp::Main::get().getNetworking()->getWorldPacket(ID_OBJECT_PLACE)->Send(); + mwmp::Main::get().getNetworking()->getObjectPacket(ID_OBJECT_PLACE)->setEvent(this); + mwmp::Main::get().getNetworking()->getObjectPacket(ID_OBJECT_PLACE)->Send(); } void WorldEvent::sendObjectSpawn() @@ -1039,44 +1039,44 @@ void WorldEvent::sendObjectSpawn() for (const auto &worldObject : worldObjects) LOG_APPEND(Log::LOG_VERBOSE, "- cellRef: %s-%i", worldObject.refId.c_str(), worldObject.refNumIndex); - mwmp::Main::get().getNetworking()->getWorldPacket(ID_OBJECT_SPAWN)->setEvent(this); - mwmp::Main::get().getNetworking()->getWorldPacket(ID_OBJECT_SPAWN)->Send(); + mwmp::Main::get().getNetworking()->getObjectPacket(ID_OBJECT_SPAWN)->setEvent(this); + mwmp::Main::get().getNetworking()->getObjectPacket(ID_OBJECT_SPAWN)->Send(); } void WorldEvent::sendObjectDelete() { - mwmp::Main::get().getNetworking()->getWorldPacket(ID_OBJECT_DELETE)->setEvent(this); - mwmp::Main::get().getNetworking()->getWorldPacket(ID_OBJECT_DELETE)->Send(); + mwmp::Main::get().getNetworking()->getObjectPacket(ID_OBJECT_DELETE)->setEvent(this); + mwmp::Main::get().getNetworking()->getObjectPacket(ID_OBJECT_DELETE)->Send(); } void WorldEvent::sendObjectLock() { - mwmp::Main::get().getNetworking()->getWorldPacket(ID_OBJECT_LOCK)->setEvent(this); - mwmp::Main::get().getNetworking()->getWorldPacket(ID_OBJECT_LOCK)->Send(); + mwmp::Main::get().getNetworking()->getObjectPacket(ID_OBJECT_LOCK)->setEvent(this); + mwmp::Main::get().getNetworking()->getObjectPacket(ID_OBJECT_LOCK)->Send(); } void WorldEvent::sendObjectTrap() { - mwmp::Main::get().getNetworking()->getWorldPacket(ID_OBJECT_TRAP)->setEvent(this); - mwmp::Main::get().getNetworking()->getWorldPacket(ID_OBJECT_TRAP)->Send(); + mwmp::Main::get().getNetworking()->getObjectPacket(ID_OBJECT_TRAP)->setEvent(this); + mwmp::Main::get().getNetworking()->getObjectPacket(ID_OBJECT_TRAP)->Send(); } void WorldEvent::sendObjectScale() { - mwmp::Main::get().getNetworking()->getWorldPacket(ID_OBJECT_SCALE)->setEvent(this); - mwmp::Main::get().getNetworking()->getWorldPacket(ID_OBJECT_SCALE)->Send(); + mwmp::Main::get().getNetworking()->getObjectPacket(ID_OBJECT_SCALE)->setEvent(this); + mwmp::Main::get().getNetworking()->getObjectPacket(ID_OBJECT_SCALE)->Send(); } void WorldEvent::sendObjectState() { - mwmp::Main::get().getNetworking()->getWorldPacket(ID_OBJECT_STATE)->setEvent(this); - mwmp::Main::get().getNetworking()->getWorldPacket(ID_OBJECT_STATE)->Send(); + mwmp::Main::get().getNetworking()->getObjectPacket(ID_OBJECT_STATE)->setEvent(this); + mwmp::Main::get().getNetworking()->getObjectPacket(ID_OBJECT_STATE)->Send(); } void WorldEvent::sendObjectAnimPlay() { - mwmp::Main::get().getNetworking()->getWorldPacket(ID_OBJECT_ANIM_PLAY)->setEvent(this); - mwmp::Main::get().getNetworking()->getWorldPacket(ID_OBJECT_ANIM_PLAY)->Send(); + mwmp::Main::get().getNetworking()->getObjectPacket(ID_OBJECT_ANIM_PLAY)->setEvent(this); + mwmp::Main::get().getNetworking()->getObjectPacket(ID_OBJECT_ANIM_PLAY)->Send(); } void WorldEvent::sendDoorState() @@ -1087,20 +1087,20 @@ void WorldEvent::sendDoorState() LOG_APPEND(Log::LOG_VERBOSE, "- cellRef: %s-%i, state: %s", worldObject.refId.c_str(), worldObject.refNumIndex, worldObject.doorState ? "true" : "false"); - mwmp::Main::get().getNetworking()->getWorldPacket(ID_DOOR_STATE)->setEvent(this); - mwmp::Main::get().getNetworking()->getWorldPacket(ID_DOOR_STATE)->Send(); + mwmp::Main::get().getNetworking()->getObjectPacket(ID_DOOR_STATE)->setEvent(this); + mwmp::Main::get().getNetworking()->getObjectPacket(ID_DOOR_STATE)->Send(); } void WorldEvent::sendMusicPlay() { - mwmp::Main::get().getNetworking()->getWorldPacket(ID_MUSIC_PLAY)->setEvent(this); - mwmp::Main::get().getNetworking()->getWorldPacket(ID_MUSIC_PLAY)->Send(); + mwmp::Main::get().getNetworking()->getObjectPacket(ID_MUSIC_PLAY)->setEvent(this); + mwmp::Main::get().getNetworking()->getObjectPacket(ID_MUSIC_PLAY)->Send(); } void WorldEvent::sendVideoPlay() { - mwmp::Main::get().getNetworking()->getWorldPacket(ID_VIDEO_PLAY)->setEvent(this); - mwmp::Main::get().getNetworking()->getWorldPacket(ID_VIDEO_PLAY)->Send(); + mwmp::Main::get().getNetworking()->getObjectPacket(ID_VIDEO_PLAY)->setEvent(this); + mwmp::Main::get().getNetworking()->getObjectPacket(ID_VIDEO_PLAY)->Send(); } void WorldEvent::sendScriptLocalShort() @@ -1111,8 +1111,8 @@ void WorldEvent::sendScriptLocalShort() LOG_APPEND(Log::LOG_VERBOSE, "- cellRef: %s-%i, index: %i, shortVal: %i", worldObject.refId.c_str(), worldObject.refNumIndex, worldObject.index, worldObject.shortVal); - mwmp::Main::get().getNetworking()->getWorldPacket(ID_SCRIPT_LOCAL_SHORT)->setEvent(this); - mwmp::Main::get().getNetworking()->getWorldPacket(ID_SCRIPT_LOCAL_SHORT)->Send(); + mwmp::Main::get().getNetworking()->getObjectPacket(ID_SCRIPT_LOCAL_SHORT)->setEvent(this); + mwmp::Main::get().getNetworking()->getObjectPacket(ID_SCRIPT_LOCAL_SHORT)->Send(); } void WorldEvent::sendScriptLocalFloat() @@ -1123,8 +1123,8 @@ void WorldEvent::sendScriptLocalFloat() LOG_APPEND(Log::LOG_VERBOSE, "- cellRef: %s-%i, index: %i, floatVal: %f", worldObject.refId.c_str(), worldObject.refNumIndex, worldObject.index, worldObject.floatVal); - mwmp::Main::get().getNetworking()->getWorldPacket(ID_SCRIPT_LOCAL_FLOAT)->setEvent(this); - mwmp::Main::get().getNetworking()->getWorldPacket(ID_SCRIPT_LOCAL_FLOAT)->Send(); + mwmp::Main::get().getNetworking()->getObjectPacket(ID_SCRIPT_LOCAL_FLOAT)->setEvent(this); + mwmp::Main::get().getNetworking()->getObjectPacket(ID_SCRIPT_LOCAL_FLOAT)->Send(); } void WorldEvent::sendScriptMemberShort() @@ -1135,8 +1135,8 @@ void WorldEvent::sendScriptMemberShort() LOG_APPEND(Log::LOG_VERBOSE, "- cellRef: %s, index: %i, shortVal: %i", worldObject.refId.c_str(), worldObject.index, worldObject.shortVal); - mwmp::Main::get().getNetworking()->getWorldPacket(ID_SCRIPT_MEMBER_SHORT)->setEvent(this); - mwmp::Main::get().getNetworking()->getWorldPacket(ID_SCRIPT_MEMBER_SHORT)->Send(); + mwmp::Main::get().getNetworking()->getObjectPacket(ID_SCRIPT_MEMBER_SHORT)->setEvent(this); + mwmp::Main::get().getNetworking()->getObjectPacket(ID_SCRIPT_MEMBER_SHORT)->Send(); } void WorldEvent::sendScriptGlobalShort() @@ -1146,14 +1146,14 @@ void WorldEvent::sendScriptGlobalShort() for (const auto &worldObject : worldObjects) LOG_APPEND(Log::LOG_VERBOSE, "- varName: %s, shortVal: %i", worldObject.varName.c_str(), worldObject.shortVal); - mwmp::Main::get().getNetworking()->getWorldPacket(ID_SCRIPT_GLOBAL_SHORT)->setEvent(this); - mwmp::Main::get().getNetworking()->getWorldPacket(ID_SCRIPT_GLOBAL_SHORT)->Send(); + mwmp::Main::get().getNetworking()->getObjectPacket(ID_SCRIPT_GLOBAL_SHORT)->setEvent(this); + mwmp::Main::get().getNetworking()->getObjectPacket(ID_SCRIPT_GLOBAL_SHORT)->Send(); } void WorldEvent::sendContainer() { LOG_MESSAGE_SIMPLE(Log::LOG_VERBOSE, "Sending ID_CONTAINER"); - mwmp::Main::get().getNetworking()->getWorldPacket(ID_CONTAINER)->setEvent(this); - mwmp::Main::get().getNetworking()->getWorldPacket(ID_CONTAINER)->Send(); + mwmp::Main::get().getNetworking()->getObjectPacket(ID_CONTAINER)->setEvent(this); + mwmp::Main::get().getNetworking()->getObjectPacket(ID_CONTAINER)->Send(); } diff --git a/apps/openmw/mwmp/processors/WorldProcessor.cpp b/apps/openmw/mwmp/processors/WorldProcessor.cpp index 67689e55b..b21292649 100644 --- a/apps/openmw/mwmp/processors/WorldProcessor.cpp +++ b/apps/openmw/mwmp/processors/WorldProcessor.cpp @@ -17,7 +17,7 @@ bool WorldProcessor::Process(RakNet::Packet &packet, WorldEvent &event) bsIn.Read(guid); event.guid = guid; - WorldPacket *myPacket = Main::get().getNetworking()->getWorldPacket(packet.data[0]); + ObjectPacket *myPacket = Main::get().getNetworking()->getObjectPacket(packet.data[0]); myPacket->setEvent(&event); myPacket->SetReadStream(&bsIn); diff --git a/apps/openmw/mwmp/processors/WorldProcessor.hpp b/apps/openmw/mwmp/processors/WorldProcessor.hpp index 0e74ac70e..776db3da8 100644 --- a/apps/openmw/mwmp/processors/WorldProcessor.hpp +++ b/apps/openmw/mwmp/processors/WorldProcessor.hpp @@ -7,7 +7,7 @@ #include #include -#include +#include #include "../WorldEvent.hpp" #include "../LocalPlayer.hpp" #include "../DedicatedPlayer.hpp" @@ -18,7 +18,7 @@ namespace mwmp class WorldProcessor : public BasePacketProcessor, public BaseClientPacketProcessor { public: - virtual void Do(WorldPacket &packet, WorldEvent &event) = 0; + virtual void Do(ObjectPacket &packet, WorldEvent &event) = 0; static bool Process(RakNet::Packet &packet, WorldEvent &event); }; diff --git a/apps/openmw/mwmp/processors/world/BaseObjectProcessor.hpp b/apps/openmw/mwmp/processors/world/BaseObjectProcessor.hpp index 62a852169..3005e8515 100644 --- a/apps/openmw/mwmp/processors/world/BaseObjectProcessor.hpp +++ b/apps/openmw/mwmp/processors/world/BaseObjectProcessor.hpp @@ -15,7 +15,7 @@ namespace mwmp class BaseObjectProcessor: public WorldProcessor { public: - virtual void Do(WorldPacket &packet, WorldEvent &event) + virtual void Do(ObjectPacket &packet, WorldEvent &event) { ptrCellStore = Main::get().getCellController()->getCellStore(event.cell); diff --git a/apps/openmw/mwmp/processors/world/ProcessorConsoleCommand.hpp b/apps/openmw/mwmp/processors/world/ProcessorConsoleCommand.hpp index bf8492733..6c838b9d8 100644 --- a/apps/openmw/mwmp/processors/world/ProcessorConsoleCommand.hpp +++ b/apps/openmw/mwmp/processors/world/ProcessorConsoleCommand.hpp @@ -13,7 +13,7 @@ namespace mwmp BPP_INIT(ID_CONSOLE_COMMAND) } - virtual void Do(WorldPacket &packet, WorldEvent &event) + virtual void Do(ObjectPacket &packet, WorldEvent &event) { BaseObjectProcessor::Do(packet, event); diff --git a/apps/openmw/mwmp/processors/world/ProcessorContainer.hpp b/apps/openmw/mwmp/processors/world/ProcessorContainer.hpp index dda5718fd..a267f05d7 100644 --- a/apps/openmw/mwmp/processors/world/ProcessorContainer.hpp +++ b/apps/openmw/mwmp/processors/world/ProcessorContainer.hpp @@ -13,7 +13,7 @@ namespace mwmp BPP_INIT(ID_CONTAINER) } - virtual void Do(WorldPacket &packet, WorldEvent &event) + virtual void Do(ObjectPacket &packet, WorldEvent &event) { BaseObjectProcessor::Do(packet, event); diff --git a/apps/openmw/mwmp/processors/world/ProcessorDoorDestination.hpp b/apps/openmw/mwmp/processors/world/ProcessorDoorDestination.hpp index 819579a2c..70a648fbb 100644 --- a/apps/openmw/mwmp/processors/world/ProcessorDoorDestination.hpp +++ b/apps/openmw/mwmp/processors/world/ProcessorDoorDestination.hpp @@ -13,7 +13,7 @@ namespace mwmp BPP_INIT(ID_DOOR_DESTINATION) } - virtual void Do(WorldPacket &packet, WorldEvent &event) + virtual void Do(ObjectPacket &packet, WorldEvent &event) { BaseObjectProcessor::Do(packet, event); diff --git a/apps/openmw/mwmp/processors/world/ProcessorDoorState.hpp b/apps/openmw/mwmp/processors/world/ProcessorDoorState.hpp index bae362aaa..12b4993bd 100644 --- a/apps/openmw/mwmp/processors/world/ProcessorDoorState.hpp +++ b/apps/openmw/mwmp/processors/world/ProcessorDoorState.hpp @@ -13,7 +13,7 @@ namespace mwmp BPP_INIT(ID_DOOR_STATE) } - virtual void Do(WorldPacket &packet, WorldEvent &event) + virtual void Do(ObjectPacket &packet, WorldEvent &event) { BaseObjectProcessor::Do(packet, event); diff --git a/apps/openmw/mwmp/processors/world/ProcessorMusicPlay.hpp b/apps/openmw/mwmp/processors/world/ProcessorMusicPlay.hpp index 6948c40b2..e7498446f 100644 --- a/apps/openmw/mwmp/processors/world/ProcessorMusicPlay.hpp +++ b/apps/openmw/mwmp/processors/world/ProcessorMusicPlay.hpp @@ -13,7 +13,7 @@ namespace mwmp BPP_INIT(ID_MUSIC_PLAY) } - virtual void Do(WorldPacket &packet, WorldEvent &event) + virtual void Do(ObjectPacket &packet, WorldEvent &event) { LOG_MESSAGE_SIMPLE(Log::LOG_VERBOSE, "Received %s", strPacketID.c_str()); event.playMusic(); diff --git a/apps/openmw/mwmp/processors/world/ProcessorObjectAnimPlay.hpp b/apps/openmw/mwmp/processors/world/ProcessorObjectAnimPlay.hpp index 8f18885f5..a595a3862 100644 --- a/apps/openmw/mwmp/processors/world/ProcessorObjectAnimPlay.hpp +++ b/apps/openmw/mwmp/processors/world/ProcessorObjectAnimPlay.hpp @@ -13,7 +13,7 @@ namespace mwmp BPP_INIT(ID_OBJECT_ANIM_PLAY) } - virtual void Do(WorldPacket &packet, WorldEvent &event) + virtual void Do(ObjectPacket &packet, WorldEvent &event) { BaseObjectProcessor::Do(packet, event); diff --git a/apps/openmw/mwmp/processors/world/ProcessorObjectAttach.hpp b/apps/openmw/mwmp/processors/world/ProcessorObjectAttach.hpp index 0554af1ee..95d8a0e7b 100644 --- a/apps/openmw/mwmp/processors/world/ProcessorObjectAttach.hpp +++ b/apps/openmw/mwmp/processors/world/ProcessorObjectAttach.hpp @@ -13,7 +13,7 @@ namespace mwmp BPP_INIT(ID_OBJECT_ATTACH) } - virtual void Do(WorldPacket &packet, WorldEvent &event) + virtual void Do(ObjectPacket &packet, WorldEvent &event) { BaseObjectProcessor::Do(packet, event); diff --git a/apps/openmw/mwmp/processors/world/ProcessorObjectCollision.hpp b/apps/openmw/mwmp/processors/world/ProcessorObjectCollision.hpp index b14d83430..d8f69cbab 100644 --- a/apps/openmw/mwmp/processors/world/ProcessorObjectCollision.hpp +++ b/apps/openmw/mwmp/processors/world/ProcessorObjectCollision.hpp @@ -13,7 +13,7 @@ namespace mwmp BPP_INIT(ID_OBJECT_COLLISION) } - virtual void Do(WorldPacket &packet, WorldEvent &event) + virtual void Do(ObjectPacket &packet, WorldEvent &event) { BaseObjectProcessor::Do(packet, event); diff --git a/apps/openmw/mwmp/processors/world/ProcessorObjectDelete.hpp b/apps/openmw/mwmp/processors/world/ProcessorObjectDelete.hpp index b42574d74..65a8d51d6 100644 --- a/apps/openmw/mwmp/processors/world/ProcessorObjectDelete.hpp +++ b/apps/openmw/mwmp/processors/world/ProcessorObjectDelete.hpp @@ -13,7 +13,7 @@ namespace mwmp BPP_INIT(ID_OBJECT_DELETE) } - virtual void Do(WorldPacket &packet, WorldEvent &event) + virtual void Do(ObjectPacket &packet, WorldEvent &event) { BaseObjectProcessor::Do(packet, event); diff --git a/apps/openmw/mwmp/processors/world/ProcessorObjectLock.hpp b/apps/openmw/mwmp/processors/world/ProcessorObjectLock.hpp index bdda47f9f..bb2614708 100644 --- a/apps/openmw/mwmp/processors/world/ProcessorObjectLock.hpp +++ b/apps/openmw/mwmp/processors/world/ProcessorObjectLock.hpp @@ -13,7 +13,7 @@ namespace mwmp BPP_INIT(ID_OBJECT_LOCK) } - virtual void Do(WorldPacket &packet, WorldEvent &event) + virtual void Do(ObjectPacket &packet, WorldEvent &event) { BaseObjectProcessor::Do(packet, event); diff --git a/apps/openmw/mwmp/processors/world/ProcessorObjectMove.hpp b/apps/openmw/mwmp/processors/world/ProcessorObjectMove.hpp index 97f16220b..baa9179fc 100644 --- a/apps/openmw/mwmp/processors/world/ProcessorObjectMove.hpp +++ b/apps/openmw/mwmp/processors/world/ProcessorObjectMove.hpp @@ -13,7 +13,7 @@ namespace mwmp BPP_INIT(ID_OBJECT_MOVE) } - virtual void Do(WorldPacket &packet, WorldEvent &event) + virtual void Do(ObjectPacket &packet, WorldEvent &event) { BaseObjectProcessor::Do(packet, event); diff --git a/apps/openmw/mwmp/processors/world/ProcessorObjectPlace.hpp b/apps/openmw/mwmp/processors/world/ProcessorObjectPlace.hpp index 30fe3cfba..5ee9d41f1 100644 --- a/apps/openmw/mwmp/processors/world/ProcessorObjectPlace.hpp +++ b/apps/openmw/mwmp/processors/world/ProcessorObjectPlace.hpp @@ -13,7 +13,7 @@ namespace mwmp BPP_INIT(ID_OBJECT_PLACE) } - virtual void Do(WorldPacket &packet, WorldEvent &event) + virtual void Do(ObjectPacket &packet, WorldEvent &event) { BaseObjectProcessor::Do(packet, event); diff --git a/apps/openmw/mwmp/processors/world/ProcessorObjectReset.hpp b/apps/openmw/mwmp/processors/world/ProcessorObjectReset.hpp index b5236c697..385e6b79c 100644 --- a/apps/openmw/mwmp/processors/world/ProcessorObjectReset.hpp +++ b/apps/openmw/mwmp/processors/world/ProcessorObjectReset.hpp @@ -13,7 +13,7 @@ namespace mwmp BPP_INIT(ID_OBJECT_RESET) } - virtual void Do(WorldPacket &packet, WorldEvent &event) + virtual void Do(ObjectPacket &packet, WorldEvent &event) { BaseObjectProcessor::Do(packet, event); diff --git a/apps/openmw/mwmp/processors/world/ProcessorObjectRotate.hpp b/apps/openmw/mwmp/processors/world/ProcessorObjectRotate.hpp index 97cec92c3..6528d5b05 100644 --- a/apps/openmw/mwmp/processors/world/ProcessorObjectRotate.hpp +++ b/apps/openmw/mwmp/processors/world/ProcessorObjectRotate.hpp @@ -13,7 +13,7 @@ namespace mwmp BPP_INIT(ID_OBJECT_ROTATE) } - virtual void Do(WorldPacket &packet, WorldEvent &event) + virtual void Do(ObjectPacket &packet, WorldEvent &event) { BaseObjectProcessor::Do(packet, event); diff --git a/apps/openmw/mwmp/processors/world/ProcessorObjectScale.hpp b/apps/openmw/mwmp/processors/world/ProcessorObjectScale.hpp index 2ea643a3f..65d3559a1 100644 --- a/apps/openmw/mwmp/processors/world/ProcessorObjectScale.hpp +++ b/apps/openmw/mwmp/processors/world/ProcessorObjectScale.hpp @@ -13,7 +13,7 @@ namespace mwmp BPP_INIT(ID_OBJECT_SCALE) } - virtual void Do(WorldPacket &packet, WorldEvent &event) + virtual void Do(ObjectPacket &packet, WorldEvent &event) { BaseObjectProcessor::Do(packet, event); diff --git a/apps/openmw/mwmp/processors/world/ProcessorObjectSpawn.hpp b/apps/openmw/mwmp/processors/world/ProcessorObjectSpawn.hpp index bd00c2086..53fce90ca 100644 --- a/apps/openmw/mwmp/processors/world/ProcessorObjectSpawn.hpp +++ b/apps/openmw/mwmp/processors/world/ProcessorObjectSpawn.hpp @@ -13,7 +13,7 @@ namespace mwmp BPP_INIT(ID_OBJECT_SPAWN) } - virtual void Do(WorldPacket &packet, WorldEvent &event) + virtual void Do(ObjectPacket &packet, WorldEvent &event) { BaseObjectProcessor::Do(packet, event); diff --git a/apps/openmw/mwmp/processors/world/ProcessorObjectState.hpp b/apps/openmw/mwmp/processors/world/ProcessorObjectState.hpp index 1619fce09..b2e7e0b2f 100644 --- a/apps/openmw/mwmp/processors/world/ProcessorObjectState.hpp +++ b/apps/openmw/mwmp/processors/world/ProcessorObjectState.hpp @@ -13,7 +13,7 @@ namespace mwmp BPP_INIT(ID_OBJECT_STATE) } - virtual void Do(WorldPacket &packet, WorldEvent &event) + virtual void Do(ObjectPacket &packet, WorldEvent &event) { BaseObjectProcessor::Do(packet, event); diff --git a/apps/openmw/mwmp/processors/world/ProcessorObjectTrap.hpp b/apps/openmw/mwmp/processors/world/ProcessorObjectTrap.hpp index 96cf9096c..ff79e140e 100644 --- a/apps/openmw/mwmp/processors/world/ProcessorObjectTrap.hpp +++ b/apps/openmw/mwmp/processors/world/ProcessorObjectTrap.hpp @@ -13,7 +13,7 @@ namespace mwmp BPP_INIT(ID_OBJECT_TRAP) } - virtual void Do(WorldPacket &packet, WorldEvent &event) + virtual void Do(ObjectPacket &packet, WorldEvent &event) { BaseObjectProcessor::Do(packet, event); diff --git a/apps/openmw/mwmp/processors/world/ProcessorScriptGlobalFloat.hpp b/apps/openmw/mwmp/processors/world/ProcessorScriptGlobalFloat.hpp index d0b1b0573..419f54e06 100644 --- a/apps/openmw/mwmp/processors/world/ProcessorScriptGlobalFloat.hpp +++ b/apps/openmw/mwmp/processors/world/ProcessorScriptGlobalFloat.hpp @@ -13,7 +13,7 @@ namespace mwmp BPP_INIT(ID_SCRIPT_GLOBAL_FLOAT) } - virtual void Do(WorldPacket &packet, WorldEvent &event) + virtual void Do(ObjectPacket &packet, WorldEvent &event) { LOG_MESSAGE_SIMPLE(Log::LOG_VERBOSE, "Received %s", strPacketID.c_str()); //event.setGlobalFloats(); diff --git a/apps/openmw/mwmp/processors/world/ProcessorScriptGlobalShort.hpp b/apps/openmw/mwmp/processors/world/ProcessorScriptGlobalShort.hpp index 5df3ce870..5353e5a89 100644 --- a/apps/openmw/mwmp/processors/world/ProcessorScriptGlobalShort.hpp +++ b/apps/openmw/mwmp/processors/world/ProcessorScriptGlobalShort.hpp @@ -13,7 +13,7 @@ namespace mwmp BPP_INIT(ID_SCRIPT_GLOBAL_SHORT) } - virtual void Do(WorldPacket &packet, WorldEvent &event) + virtual void Do(ObjectPacket &packet, WorldEvent &event) { LOG_MESSAGE_SIMPLE(Log::LOG_VERBOSE, "Received %s", strPacketID.c_str()); event.setGlobalShorts(); diff --git a/apps/openmw/mwmp/processors/world/ProcessorScriptLocalFloat.hpp b/apps/openmw/mwmp/processors/world/ProcessorScriptLocalFloat.hpp index 0f9e05ca7..16a5713c7 100644 --- a/apps/openmw/mwmp/processors/world/ProcessorScriptLocalFloat.hpp +++ b/apps/openmw/mwmp/processors/world/ProcessorScriptLocalFloat.hpp @@ -13,7 +13,7 @@ namespace mwmp BPP_INIT(ID_SCRIPT_LOCAL_FLOAT) } - virtual void Do(WorldPacket &packet, WorldEvent &event) + virtual void Do(ObjectPacket &packet, WorldEvent &event) { BaseObjectProcessor::Do(packet, event); diff --git a/apps/openmw/mwmp/processors/world/ProcessorScriptLocalShort.hpp b/apps/openmw/mwmp/processors/world/ProcessorScriptLocalShort.hpp index aac28f167..1687f34ad 100644 --- a/apps/openmw/mwmp/processors/world/ProcessorScriptLocalShort.hpp +++ b/apps/openmw/mwmp/processors/world/ProcessorScriptLocalShort.hpp @@ -13,7 +13,7 @@ namespace mwmp BPP_INIT(ID_SCRIPT_LOCAL_SHORT) } - virtual void Do(WorldPacket &packet, WorldEvent &event) + virtual void Do(ObjectPacket &packet, WorldEvent &event) { BaseObjectProcessor::Do(packet, event); diff --git a/apps/openmw/mwmp/processors/world/ProcessorScriptMemberFloat.hpp b/apps/openmw/mwmp/processors/world/ProcessorScriptMemberFloat.hpp index fa656f5aa..b8b78e8f7 100644 --- a/apps/openmw/mwmp/processors/world/ProcessorScriptMemberFloat.hpp +++ b/apps/openmw/mwmp/processors/world/ProcessorScriptMemberFloat.hpp @@ -13,7 +13,7 @@ namespace mwmp BPP_INIT(ID_SCRIPT_MEMBER_FLOAT) } - virtual void Do(WorldPacket &packet, WorldEvent &event) + virtual void Do(ObjectPacket &packet, WorldEvent &event) { LOG_MESSAGE_SIMPLE(Log::LOG_VERBOSE, "Received %s", strPacketID.c_str()); //event.setMemberFloats(); diff --git a/apps/openmw/mwmp/processors/world/ProcessorScriptMemberShort.hpp b/apps/openmw/mwmp/processors/world/ProcessorScriptMemberShort.hpp index e40f4c9a1..d0f4331ab 100644 --- a/apps/openmw/mwmp/processors/world/ProcessorScriptMemberShort.hpp +++ b/apps/openmw/mwmp/processors/world/ProcessorScriptMemberShort.hpp @@ -13,7 +13,7 @@ namespace mwmp BPP_INIT(ID_SCRIPT_MEMBER_SHORT) } - virtual void Do(WorldPacket &packet, WorldEvent &event) + virtual void Do(ObjectPacket &packet, WorldEvent &event) { LOG_MESSAGE_SIMPLE(Log::LOG_VERBOSE, "Received %s", strPacketID.c_str()); event.setMemberShorts(); diff --git a/apps/openmw/mwmp/processors/world/ProcessorVideoPlay.hpp b/apps/openmw/mwmp/processors/world/ProcessorVideoPlay.hpp index 7cf706377..df9e9a7d0 100644 --- a/apps/openmw/mwmp/processors/world/ProcessorVideoPlay.hpp +++ b/apps/openmw/mwmp/processors/world/ProcessorVideoPlay.hpp @@ -13,7 +13,7 @@ namespace mwmp BPP_INIT(ID_VIDEO_PLAY) } - virtual void Do(WorldPacket &packet, WorldEvent &event) + virtual void Do(ObjectPacket &packet, WorldEvent &event) { LOG_MESSAGE_SIMPLE(Log::LOG_VERBOSE, "Received %s", strPacketID.c_str()); event.playVideo(); diff --git a/components/CMakeLists.txt b/components/CMakeLists.txt index ff26452e0..e5965af2f 100644 --- a/components/CMakeLists.txt +++ b/components/CMakeLists.txt @@ -154,7 +154,7 @@ add_component_dir (openmw-mp/Base ) add_component_dir (openmw-mp/Controllers - PlayerPacketController ActorPacketController WorldPacketController PacketController + PlayerPacketController ActorPacketController ObjectPacketController PacketController ) add_component_dir(openmw-mp/Master @@ -188,8 +188,8 @@ add_component_dir (openmw-mp/Packets/Player PacketPlayerResurrect PacketPlayerShapeshift PacketPlayerSkill PacketPlayerSpeech PacketPlayerSpellbook PacketPlayerStatsDynamic PacketPlayerTopic ) -add_component_dir (openmw-mp/Packets/World - WorldPacket +add_component_dir (openmw-mp/Packets/Object + ObjectPacket PacketConsoleCommand PacketContainer PacketObjectAnimPlay PacketObjectAttach PacketObjectCollision PacketObjectDelete PacketDoorDestination PacketDoorState PacketObjectLock PacketObjectMove PacketObjectPlace PacketObjectReset PacketObjectRotate PacketObjectScale PacketObjectSpawn PacketObjectState PacketObjectTrap diff --git a/components/openmw-mp/Controllers/ObjectPacketController.cpp b/components/openmw-mp/Controllers/ObjectPacketController.cpp new file mode 100644 index 000000000..7dc553e57 --- /dev/null +++ b/components/openmw-mp/Controllers/ObjectPacketController.cpp @@ -0,0 +1,60 @@ +#include "../Packets/Object/PacketObjectAnimPlay.hpp" +#include "../Packets/Object/PacketObjectAttach.hpp" +#include "../Packets/Object/PacketObjectCollision.hpp" +#include "../Packets/Object/PacketObjectDelete.hpp" +#include "../Packets/Object/PacketObjectLock.hpp" +#include "../Packets/Object/PacketObjectMove.hpp" +#include "../Packets/Object/PacketObjectPlace.hpp" +#include "../Packets/Object/PacketObjectReset.hpp" +#include "../Packets/Object/PacketObjectRotate.hpp" +#include "../Packets/Object/PacketObjectScale.hpp" +#include "../Packets/Object/PacketObjectSpawn.hpp" +#include "../Packets/Object/PacketObjectState.hpp" +#include "../Packets/Object/PacketObjectTrap.hpp" + +#include "../Packets/Object/PacketContainer.hpp" +#include "../Packets/Object/PacketDoorDestination.hpp" +#include "../Packets/Object/PacketDoorState.hpp" +#include "../Packets/Object/PacketMusicPlay.hpp" +#include "../Packets/Object/PacketVideoPlay.hpp" + +#include "../Packets/Object/PacketConsoleCommand.hpp" +#include "../Packets/Object/PacketScriptLocalShort.hpp" +#include "../Packets/Object/PacketScriptLocalFloat.hpp" +#include "../Packets/Object/PacketScriptMemberShort.hpp" +#include "../Packets/Object/PacketScriptMemberFloat.hpp" +#include "../Packets/Object/PacketScriptGlobalShort.hpp" +#include "../Packets/Object/PacketScriptGlobalFloat.hpp" + +#include "ObjectPacketController.hpp" + +mwmp::ObjectPacketController::ObjectPacketController(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); + 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/Controllers/WorldPacketController.hpp b/components/openmw-mp/Controllers/ObjectPacketController.hpp similarity index 52% rename from components/openmw-mp/Controllers/WorldPacketController.hpp rename to components/openmw-mp/Controllers/ObjectPacketController.hpp index 46f9c8be4..6c75277b2 100644 --- a/components/openmw-mp/Controllers/WorldPacketController.hpp +++ b/components/openmw-mp/Controllers/ObjectPacketController.hpp @@ -2,15 +2,15 @@ #define OPENMW_WORLDPACKETCONTROLLER_HPP -#include "../Packets/World/WorldPacket.hpp" +#include "../Packets/Object/ObjectPacket.hpp" #include "BasePacketController.hpp" namespace mwmp { - class WorldPacketController: public BasePacketController + class ObjectPacketController: public BasePacketController { public: - WorldPacketController(RakNet::RakPeerInterface *peer); + ObjectPacketController(RakNet::RakPeerInterface *peer); }; } diff --git a/components/openmw-mp/Controllers/WorldPacketController.cpp b/components/openmw-mp/Controllers/WorldPacketController.cpp deleted file mode 100644 index 0cbea8a9e..000000000 --- a/components/openmw-mp/Controllers/WorldPacketController.cpp +++ /dev/null @@ -1,60 +0,0 @@ -#include "../Packets/World/PacketObjectAnimPlay.hpp" -#include "../Packets/World/PacketObjectAttach.hpp" -#include "../Packets/World/PacketObjectCollision.hpp" -#include "../Packets/World/PacketObjectDelete.hpp" -#include "../Packets/World/PacketObjectLock.hpp" -#include "../Packets/World/PacketObjectMove.hpp" -#include "../Packets/World/PacketObjectPlace.hpp" -#include "../Packets/World/PacketObjectReset.hpp" -#include "../Packets/World/PacketObjectRotate.hpp" -#include "../Packets/World/PacketObjectScale.hpp" -#include "../Packets/World/PacketObjectSpawn.hpp" -#include "../Packets/World/PacketObjectState.hpp" -#include "../Packets/World/PacketObjectTrap.hpp" - -#include "../Packets/World/PacketContainer.hpp" -#include "../Packets/World/PacketDoorDestination.hpp" -#include "../Packets/World/PacketDoorState.hpp" -#include "../Packets/World/PacketMusicPlay.hpp" -#include "../Packets/World/PacketVideoPlay.hpp" - -#include "../Packets/World/PacketConsoleCommand.hpp" -#include "../Packets/World/PacketScriptLocalShort.hpp" -#include "../Packets/World/PacketScriptLocalFloat.hpp" -#include "../Packets/World/PacketScriptMemberShort.hpp" -#include "../Packets/World/PacketScriptMemberFloat.hpp" -#include "../Packets/World/PacketScriptGlobalShort.hpp" -#include "../Packets/World/PacketScriptGlobalFloat.hpp" - -#include "WorldPacketController.hpp" - -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); - 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/Packets/World/WorldPacket.cpp b/components/openmw-mp/Packets/Object/ObjectPacket.cpp similarity index 77% rename from components/openmw-mp/Packets/World/WorldPacket.cpp rename to components/openmw-mp/Packets/Object/ObjectPacket.cpp index 5b28e044e..b8e5de7f0 100644 --- a/components/openmw-mp/Packets/World/WorldPacket.cpp +++ b/components/openmw-mp/Packets/Object/ObjectPacket.cpp @@ -1,11 +1,11 @@ #include #include #include -#include "WorldPacket.hpp" +#include "ObjectPacket.hpp" using namespace mwmp; -WorldPacket::WorldPacket(RakNet::RakPeerInterface *peer) : BasePacket(peer) +ObjectPacket::ObjectPacket(RakNet::RakPeerInterface *peer) : BasePacket(peer) { hasCellData = false; packetID = 0; @@ -15,13 +15,13 @@ WorldPacket::WorldPacket(RakNet::RakPeerInterface *peer) : BasePacket(peer) this->peer = peer; } -void WorldPacket::setEvent(BaseEvent *event) +void ObjectPacket::setEvent(BaseEvent *event) { this->event = event; guid = event->guid; } -void WorldPacket::Packet(RakNet::BitStream *bs, bool send) +void ObjectPacket::Packet(RakNet::BitStream *bs, bool send) { if (!PacketHeader(bs, send)) return; @@ -32,7 +32,7 @@ void WorldPacket::Packet(RakNet::BitStream *bs, bool send) } } -bool WorldPacket::PacketHeader(RakNet::BitStream *bs, bool send) +bool ObjectPacket::PacketHeader(RakNet::BitStream *bs, bool send) { BasePacket::Packet(bs, send); @@ -64,7 +64,7 @@ bool WorldPacket::PacketHeader(RakNet::BitStream *bs, bool send) return true; } -void WorldPacket::Object(WorldObject &worldObject, bool send) +void ObjectPacket::Object(WorldObject &worldObject, bool send) { RW(worldObject.refId, send); RW(worldObject.refNumIndex, send); diff --git a/components/openmw-mp/Packets/World/WorldPacket.hpp b/components/openmw-mp/Packets/Object/ObjectPacket.hpp similarity index 82% rename from components/openmw-mp/Packets/World/WorldPacket.hpp rename to components/openmw-mp/Packets/Object/ObjectPacket.hpp index d788008a7..7b99905bd 100644 --- a/components/openmw-mp/Packets/World/WorldPacket.hpp +++ b/components/openmw-mp/Packets/Object/ObjectPacket.hpp @@ -12,12 +12,12 @@ namespace mwmp { - class WorldPacket: public BasePacket + class ObjectPacket: public BasePacket { public: - explicit WorldPacket(RakNet::RakPeerInterface *peer); + explicit ObjectPacket(RakNet::RakPeerInterface *peer); - ~WorldPacket() override = default; + ~ObjectPacket() override = default; void setEvent(BaseEvent *event); diff --git a/components/openmw-mp/Packets/World/PacketConsoleCommand.cpp b/components/openmw-mp/Packets/Object/PacketConsoleCommand.cpp similarity index 95% rename from components/openmw-mp/Packets/World/PacketConsoleCommand.cpp rename to components/openmw-mp/Packets/Object/PacketConsoleCommand.cpp index 8d6489e9c..b48ec8958 100644 --- a/components/openmw-mp/Packets/World/PacketConsoleCommand.cpp +++ b/components/openmw-mp/Packets/Object/PacketConsoleCommand.cpp @@ -3,7 +3,7 @@ using namespace mwmp; -PacketConsoleCommand::PacketConsoleCommand(RakNet::RakPeerInterface *peer) : WorldPacket(peer) +PacketConsoleCommand::PacketConsoleCommand(RakNet::RakPeerInterface *peer) : ObjectPacket(peer) { packetID = ID_CONSOLE_COMMAND; } diff --git a/components/openmw-mp/Packets/World/PacketConsoleCommand.hpp b/components/openmw-mp/Packets/Object/PacketConsoleCommand.hpp similarity index 71% rename from components/openmw-mp/Packets/World/PacketConsoleCommand.hpp rename to components/openmw-mp/Packets/Object/PacketConsoleCommand.hpp index c8de1b550..1b1fa6f9e 100644 --- a/components/openmw-mp/Packets/World/PacketConsoleCommand.hpp +++ b/components/openmw-mp/Packets/Object/PacketConsoleCommand.hpp @@ -1,11 +1,11 @@ #ifndef OPENMW_PACKETCONSOLECOMMAND_HPP #define OPENMW_PACKETCONSOLECOMMAND_HPP -#include +#include namespace mwmp { - class PacketConsoleCommand final: public WorldPacket + class PacketConsoleCommand final: public ObjectPacket { public: explicit PacketConsoleCommand(RakNet::RakPeerInterface *peer); diff --git a/components/openmw-mp/Packets/World/PacketContainer.cpp b/components/openmw-mp/Packets/Object/PacketContainer.cpp similarity index 98% rename from components/openmw-mp/Packets/World/PacketContainer.cpp rename to components/openmw-mp/Packets/Object/PacketContainer.cpp index dc5087bc2..23bc908c9 100644 --- a/components/openmw-mp/Packets/World/PacketContainer.cpp +++ b/components/openmw-mp/Packets/Object/PacketContainer.cpp @@ -4,7 +4,7 @@ using namespace mwmp; -PacketContainer::PacketContainer(RakNet::RakPeerInterface *peer) : WorldPacket(peer) +PacketContainer::PacketContainer(RakNet::RakPeerInterface *peer) : ObjectPacket(peer) { packetID = ID_CONTAINER; hasCellData = true; diff --git a/components/openmw-mp/Packets/World/PacketContainer.hpp b/components/openmw-mp/Packets/Object/PacketContainer.hpp similarity index 70% rename from components/openmw-mp/Packets/World/PacketContainer.hpp rename to components/openmw-mp/Packets/Object/PacketContainer.hpp index 0b42cb3f4..a03da4f1a 100644 --- a/components/openmw-mp/Packets/World/PacketContainer.hpp +++ b/components/openmw-mp/Packets/Object/PacketContainer.hpp @@ -1,11 +1,11 @@ #ifndef OPENMW_PACKETCONTAINER_HPP #define OPENMW_PACKETCONTAINER_HPP -#include +#include namespace mwmp { - class PacketContainer final: public WorldPacket + class PacketContainer final: public ObjectPacket { public: explicit PacketContainer(RakNet::RakPeerInterface *peer); diff --git a/components/openmw-mp/Packets/World/PacketDoorDestination.cpp b/components/openmw-mp/Packets/Object/PacketDoorDestination.cpp similarity index 89% rename from components/openmw-mp/Packets/World/PacketDoorDestination.cpp rename to components/openmw-mp/Packets/Object/PacketDoorDestination.cpp index 827d65e40..45717075b 100644 --- a/components/openmw-mp/Packets/World/PacketDoorDestination.cpp +++ b/components/openmw-mp/Packets/Object/PacketDoorDestination.cpp @@ -3,7 +3,7 @@ using namespace mwmp; -PacketDoorDestination::PacketDoorDestination(RakNet::RakPeerInterface *peer) : WorldPacket(peer) +PacketDoorDestination::PacketDoorDestination(RakNet::RakPeerInterface *peer) : ObjectPacket(peer) { packetID = ID_DOOR_DESTINATION; hasCellData = true; @@ -11,7 +11,7 @@ PacketDoorDestination::PacketDoorDestination(RakNet::RakPeerInterface *peer) : W void PacketDoorDestination::Object(WorldObject &worldObject, bool send) { - WorldPacket::Object(worldObject, send); + ObjectPacket::Object(worldObject, send); RW(worldObject.teleportState, send); diff --git a/components/openmw-mp/Packets/World/PacketDoorDestination.hpp b/components/openmw-mp/Packets/Object/PacketDoorDestination.hpp similarity index 71% rename from components/openmw-mp/Packets/World/PacketDoorDestination.hpp rename to components/openmw-mp/Packets/Object/PacketDoorDestination.hpp index 329476259..64d23cfae 100644 --- a/components/openmw-mp/Packets/World/PacketDoorDestination.hpp +++ b/components/openmw-mp/Packets/Object/PacketDoorDestination.hpp @@ -1,11 +1,11 @@ #ifndef OPENMW_PACKETDOORDESTINATION_HPP #define OPENMW_PACKETDOORDESTINATION_HPP -#include +#include namespace mwmp { - class PacketDoorDestination : public WorldPacket + class PacketDoorDestination : public ObjectPacket { public: PacketDoorDestination(RakNet::RakPeerInterface *peer); diff --git a/components/openmw-mp/Packets/World/PacketDoorState.cpp b/components/openmw-mp/Packets/Object/PacketDoorState.cpp similarity index 83% rename from components/openmw-mp/Packets/World/PacketDoorState.cpp rename to components/openmw-mp/Packets/Object/PacketDoorState.cpp index 448bc2025..51bc92c6a 100644 --- a/components/openmw-mp/Packets/World/PacketDoorState.cpp +++ b/components/openmw-mp/Packets/Object/PacketDoorState.cpp @@ -3,7 +3,7 @@ using namespace mwmp; -PacketDoorState::PacketDoorState(RakNet::RakPeerInterface *peer) : WorldPacket(peer) +PacketDoorState::PacketDoorState(RakNet::RakPeerInterface *peer) : ObjectPacket(peer) { packetID = ID_DOOR_STATE; hasCellData = true; @@ -11,6 +11,6 @@ PacketDoorState::PacketDoorState(RakNet::RakPeerInterface *peer) : WorldPacket(p void PacketDoorState::Object(WorldObject &worldObject, bool send) { - WorldPacket::Object(worldObject, send); + ObjectPacket::Object(worldObject, send); RW(worldObject.doorState, send); } diff --git a/components/openmw-mp/Packets/World/PacketDoorState.hpp b/components/openmw-mp/Packets/Object/PacketDoorState.hpp similarity index 71% rename from components/openmw-mp/Packets/World/PacketDoorState.hpp rename to components/openmw-mp/Packets/Object/PacketDoorState.hpp index a156182da..0796aa89f 100644 --- a/components/openmw-mp/Packets/World/PacketDoorState.hpp +++ b/components/openmw-mp/Packets/Object/PacketDoorState.hpp @@ -1,11 +1,11 @@ #ifndef OPENMW_PACKETDOORSTATE_HPP #define OPENMW_PACKETDOORSTATE_HPP -#include +#include namespace mwmp { - class PacketDoorState final: public WorldPacket + class PacketDoorState final: public ObjectPacket { public: explicit PacketDoorState(RakNet::RakPeerInterface *peer); diff --git a/components/openmw-mp/Packets/World/PacketMusicPlay.cpp b/components/openmw-mp/Packets/Object/PacketMusicPlay.cpp similarity index 93% rename from components/openmw-mp/Packets/World/PacketMusicPlay.cpp rename to components/openmw-mp/Packets/Object/PacketMusicPlay.cpp index 45b6b2bee..3c5263697 100644 --- a/components/openmw-mp/Packets/World/PacketMusicPlay.cpp +++ b/components/openmw-mp/Packets/Object/PacketMusicPlay.cpp @@ -3,7 +3,7 @@ using namespace mwmp; -PacketMusicPlay::PacketMusicPlay(RakNet::RakPeerInterface *peer) : WorldPacket(peer) +PacketMusicPlay::PacketMusicPlay(RakNet::RakPeerInterface *peer) : ObjectPacket(peer) { packetID = ID_MUSIC_PLAY; } diff --git a/components/openmw-mp/Packets/World/PacketMusicPlay.hpp b/components/openmw-mp/Packets/Object/PacketMusicPlay.hpp similarity index 71% rename from components/openmw-mp/Packets/World/PacketMusicPlay.hpp rename to components/openmw-mp/Packets/Object/PacketMusicPlay.hpp index aa98f3bb9..773a003ed 100644 --- a/components/openmw-mp/Packets/World/PacketMusicPlay.hpp +++ b/components/openmw-mp/Packets/Object/PacketMusicPlay.hpp @@ -1,11 +1,11 @@ #ifndef OPENMW_PACKETMUSICPLAY_HPP #define OPENMW_PACKETMUSICPLAY_HPP -#include +#include namespace mwmp { - class PacketMusicPlay final: public WorldPacket + class PacketMusicPlay final: public ObjectPacket { public: explicit PacketMusicPlay(RakNet::RakPeerInterface *peer); diff --git a/components/openmw-mp/Packets/World/PacketObjectAnimPlay.cpp b/components/openmw-mp/Packets/Object/PacketObjectAnimPlay.cpp similarity index 83% rename from components/openmw-mp/Packets/World/PacketObjectAnimPlay.cpp rename to components/openmw-mp/Packets/Object/PacketObjectAnimPlay.cpp index af0c355ee..5d641d940 100644 --- a/components/openmw-mp/Packets/World/PacketObjectAnimPlay.cpp +++ b/components/openmw-mp/Packets/Object/PacketObjectAnimPlay.cpp @@ -3,7 +3,7 @@ using namespace mwmp; -PacketObjectAnimPlay::PacketObjectAnimPlay(RakNet::RakPeerInterface *peer) : WorldPacket(peer) +PacketObjectAnimPlay::PacketObjectAnimPlay(RakNet::RakPeerInterface *peer) : ObjectPacket(peer) { packetID = ID_OBJECT_ANIM_PLAY; hasCellData = true; @@ -11,7 +11,7 @@ PacketObjectAnimPlay::PacketObjectAnimPlay(RakNet::RakPeerInterface *peer) : Wor void PacketObjectAnimPlay::Object(WorldObject &worldObject, bool send) { - WorldPacket::Object(worldObject, send); + ObjectPacket::Object(worldObject, send); RW(worldObject.animGroup, send); RW(worldObject.animMode, send); } diff --git a/components/openmw-mp/Packets/World/PacketObjectAnimPlay.hpp b/components/openmw-mp/Packets/Object/PacketObjectAnimPlay.hpp similarity index 71% rename from components/openmw-mp/Packets/World/PacketObjectAnimPlay.hpp rename to components/openmw-mp/Packets/Object/PacketObjectAnimPlay.hpp index 4cbe94200..5bfa1eee0 100644 --- a/components/openmw-mp/Packets/World/PacketObjectAnimPlay.hpp +++ b/components/openmw-mp/Packets/Object/PacketObjectAnimPlay.hpp @@ -1,11 +1,11 @@ #ifndef OPENMW_PACKETOBJECTANIMPLAY_HPP #define OPENMW_PACKETOBJECTANIMPLAY_HPP -#include +#include namespace mwmp { - class PacketObjectAnimPlay final: public WorldPacket + class PacketObjectAnimPlay final: public ObjectPacket { public: explicit PacketObjectAnimPlay(RakNet::RakPeerInterface *peer); diff --git a/components/openmw-mp/Packets/World/PacketObjectAttach.cpp b/components/openmw-mp/Packets/Object/PacketObjectAttach.cpp similarity index 81% rename from components/openmw-mp/Packets/World/PacketObjectAttach.cpp rename to components/openmw-mp/Packets/Object/PacketObjectAttach.cpp index 7404e72f0..b96a4cf8f 100644 --- a/components/openmw-mp/Packets/World/PacketObjectAttach.cpp +++ b/components/openmw-mp/Packets/Object/PacketObjectAttach.cpp @@ -3,7 +3,7 @@ using namespace mwmp; -PacketObjectAttach::PacketObjectAttach(RakNet::RakPeerInterface *peer) : WorldPacket(peer) +PacketObjectAttach::PacketObjectAttach(RakNet::RakPeerInterface *peer) : ObjectPacket(peer) { packetID = ID_OBJECT_ATTACH; hasCellData = true; @@ -11,6 +11,6 @@ PacketObjectAttach::PacketObjectAttach(RakNet::RakPeerInterface *peer) : WorldPa void PacketObjectAttach::Object(WorldObject &worldObject, bool send) { - WorldPacket::Object(worldObject, send); + ObjectPacket::Object(worldObject, send); // Placeholder } diff --git a/components/openmw-mp/Packets/World/PacketObjectAttach.hpp b/components/openmw-mp/Packets/Object/PacketObjectAttach.hpp similarity index 71% rename from components/openmw-mp/Packets/World/PacketObjectAttach.hpp rename to components/openmw-mp/Packets/Object/PacketObjectAttach.hpp index 98e1b53d2..680dc57f7 100644 --- a/components/openmw-mp/Packets/World/PacketObjectAttach.hpp +++ b/components/openmw-mp/Packets/Object/PacketObjectAttach.hpp @@ -1,11 +1,11 @@ #ifndef OPENMW_PACKETOBJECTATTACH_HPP #define OPENMW_PACKETOBJECTATTACH_HPP -#include +#include namespace mwmp { - class PacketObjectAttach : public WorldPacket + class PacketObjectAttach : public ObjectPacket { public: PacketObjectAttach(RakNet::RakPeerInterface *peer); diff --git a/components/openmw-mp/Packets/World/PacketObjectCollision.cpp b/components/openmw-mp/Packets/Object/PacketObjectCollision.cpp similarity index 81% rename from components/openmw-mp/Packets/World/PacketObjectCollision.cpp rename to components/openmw-mp/Packets/Object/PacketObjectCollision.cpp index deeb6b5a6..50d72e298 100644 --- a/components/openmw-mp/Packets/World/PacketObjectCollision.cpp +++ b/components/openmw-mp/Packets/Object/PacketObjectCollision.cpp @@ -3,7 +3,7 @@ using namespace mwmp; -PacketObjectCollision::PacketObjectCollision(RakNet::RakPeerInterface *peer) : WorldPacket(peer) +PacketObjectCollision::PacketObjectCollision(RakNet::RakPeerInterface *peer) : ObjectPacket(peer) { packetID = ID_OBJECT_COLLISION; hasCellData = true; @@ -11,6 +11,6 @@ PacketObjectCollision::PacketObjectCollision(RakNet::RakPeerInterface *peer) : W void PacketObjectCollision::Object(WorldObject &worldObject, bool send) { - WorldPacket::Object(worldObject, send); + ObjectPacket::Object(worldObject, send); // Placeholder } diff --git a/components/openmw-mp/Packets/World/PacketObjectCollision.hpp b/components/openmw-mp/Packets/Object/PacketObjectCollision.hpp similarity index 71% rename from components/openmw-mp/Packets/World/PacketObjectCollision.hpp rename to components/openmw-mp/Packets/Object/PacketObjectCollision.hpp index 63c6a9129..74bd1a085 100644 --- a/components/openmw-mp/Packets/World/PacketObjectCollision.hpp +++ b/components/openmw-mp/Packets/Object/PacketObjectCollision.hpp @@ -1,11 +1,11 @@ #ifndef OPENMW_PACKETOBJECTCOLLISION_HPP #define OPENMW_PACKETOBJECTCOLLISION_HPP -#include +#include namespace mwmp { - class PacketObjectCollision : public WorldPacket + class PacketObjectCollision : public ObjectPacket { public: PacketObjectCollision(RakNet::RakPeerInterface *peer); diff --git a/components/openmw-mp/Packets/World/PacketObjectDelete.cpp b/components/openmw-mp/Packets/Object/PacketObjectDelete.cpp similarity index 89% rename from components/openmw-mp/Packets/World/PacketObjectDelete.cpp rename to components/openmw-mp/Packets/Object/PacketObjectDelete.cpp index c999d7072..6187abcd9 100644 --- a/components/openmw-mp/Packets/World/PacketObjectDelete.cpp +++ b/components/openmw-mp/Packets/Object/PacketObjectDelete.cpp @@ -3,7 +3,7 @@ using namespace mwmp; -PacketObjectDelete::PacketObjectDelete(RakNet::RakPeerInterface *peer) : WorldPacket(peer) +PacketObjectDelete::PacketObjectDelete(RakNet::RakPeerInterface *peer) : ObjectPacket(peer) { packetID = ID_OBJECT_DELETE; hasCellData = true; diff --git a/components/openmw-mp/Packets/World/PacketObjectDelete.hpp b/components/openmw-mp/Packets/Object/PacketObjectDelete.hpp similarity index 65% rename from components/openmw-mp/Packets/World/PacketObjectDelete.hpp rename to components/openmw-mp/Packets/Object/PacketObjectDelete.hpp index ba33b6b9e..ae2bcd44c 100644 --- a/components/openmw-mp/Packets/World/PacketObjectDelete.hpp +++ b/components/openmw-mp/Packets/Object/PacketObjectDelete.hpp @@ -1,11 +1,11 @@ #ifndef OPENMW_PACKETOBJECTDELETE_HPP #define OPENMW_PACKETOBJECTDELETE_HPP -#include +#include namespace mwmp { - class PacketObjectDelete final: public WorldPacket + class PacketObjectDelete final: public ObjectPacket { public: explicit PacketObjectDelete(RakNet::RakPeerInterface *peer); diff --git a/components/openmw-mp/Packets/World/PacketObjectLock.cpp b/components/openmw-mp/Packets/Object/PacketObjectLock.cpp similarity index 83% rename from components/openmw-mp/Packets/World/PacketObjectLock.cpp rename to components/openmw-mp/Packets/Object/PacketObjectLock.cpp index 83b8ec5ac..9daf1d098 100644 --- a/components/openmw-mp/Packets/World/PacketObjectLock.cpp +++ b/components/openmw-mp/Packets/Object/PacketObjectLock.cpp @@ -3,7 +3,7 @@ using namespace mwmp; -PacketObjectLock::PacketObjectLock(RakNet::RakPeerInterface *peer) : WorldPacket(peer) +PacketObjectLock::PacketObjectLock(RakNet::RakPeerInterface *peer) : ObjectPacket(peer) { packetID = ID_OBJECT_LOCK; hasCellData = true; @@ -11,6 +11,6 @@ PacketObjectLock::PacketObjectLock(RakNet::RakPeerInterface *peer) : WorldPacket void PacketObjectLock::Object(WorldObject &worldObject, bool send) { - WorldPacket::Object(worldObject, send); + ObjectPacket::Object(worldObject, send); RW(worldObject.lockLevel, send); } diff --git a/components/openmw-mp/Packets/World/PacketObjectLock.hpp b/components/openmw-mp/Packets/Object/PacketObjectLock.hpp similarity index 71% rename from components/openmw-mp/Packets/World/PacketObjectLock.hpp rename to components/openmw-mp/Packets/Object/PacketObjectLock.hpp index 536ce45b6..01eda365d 100644 --- a/components/openmw-mp/Packets/World/PacketObjectLock.hpp +++ b/components/openmw-mp/Packets/Object/PacketObjectLock.hpp @@ -1,11 +1,11 @@ #ifndef OPENMW_PACKETOBJECTLOCK_HPP #define OPENMW_PACKETOBJECTLOCK_HPP -#include +#include namespace mwmp { - class PacketObjectLock final: public WorldPacket + class PacketObjectLock final: public ObjectPacket { public: explicit PacketObjectLock(RakNet::RakPeerInterface *peer); diff --git a/components/openmw-mp/Packets/World/PacketObjectMove.cpp b/components/openmw-mp/Packets/Object/PacketObjectMove.cpp similarity index 83% rename from components/openmw-mp/Packets/World/PacketObjectMove.cpp rename to components/openmw-mp/Packets/Object/PacketObjectMove.cpp index 35fb22bfc..4c043ebbf 100644 --- a/components/openmw-mp/Packets/World/PacketObjectMove.cpp +++ b/components/openmw-mp/Packets/Object/PacketObjectMove.cpp @@ -3,7 +3,7 @@ using namespace mwmp; -PacketObjectMove::PacketObjectMove(RakNet::RakPeerInterface *peer) : WorldPacket(peer) +PacketObjectMove::PacketObjectMove(RakNet::RakPeerInterface *peer) : ObjectPacket(peer) { packetID = ID_OBJECT_MOVE; hasCellData = true; @@ -11,6 +11,6 @@ PacketObjectMove::PacketObjectMove(RakNet::RakPeerInterface *peer) : WorldPacket void PacketObjectMove::Object(WorldObject &worldObject, bool send) { - WorldPacket::Object(worldObject, send); + ObjectPacket::Object(worldObject, send); RW(worldObject.position.pos, send); } diff --git a/components/openmw-mp/Packets/World/PacketObjectMove.hpp b/components/openmw-mp/Packets/Object/PacketObjectMove.hpp similarity index 71% rename from components/openmw-mp/Packets/World/PacketObjectMove.hpp rename to components/openmw-mp/Packets/Object/PacketObjectMove.hpp index 66de4bb5b..78a0dd7a8 100644 --- a/components/openmw-mp/Packets/World/PacketObjectMove.hpp +++ b/components/openmw-mp/Packets/Object/PacketObjectMove.hpp @@ -1,11 +1,11 @@ #ifndef OPENMW_PacketObjectMove_HPP #define OPENMW_PacketObjectMove_HPP -#include +#include namespace mwmp { - class PacketObjectMove final: public WorldPacket + class PacketObjectMove final: public ObjectPacket { public: explicit PacketObjectMove(RakNet::RakPeerInterface *peer); diff --git a/components/openmw-mp/Packets/World/PacketObjectPlace.cpp b/components/openmw-mp/Packets/Object/PacketObjectPlace.cpp similarity index 88% rename from components/openmw-mp/Packets/World/PacketObjectPlace.cpp rename to components/openmw-mp/Packets/Object/PacketObjectPlace.cpp index 17657dfb6..2bc4682c3 100644 --- a/components/openmw-mp/Packets/World/PacketObjectPlace.cpp +++ b/components/openmw-mp/Packets/Object/PacketObjectPlace.cpp @@ -3,7 +3,7 @@ using namespace mwmp; -PacketObjectPlace::PacketObjectPlace(RakNet::RakPeerInterface *peer) : WorldPacket(peer) +PacketObjectPlace::PacketObjectPlace(RakNet::RakPeerInterface *peer) : ObjectPacket(peer) { packetID = ID_OBJECT_PLACE; hasCellData = true; @@ -11,7 +11,7 @@ PacketObjectPlace::PacketObjectPlace(RakNet::RakPeerInterface *peer) : WorldPack void PacketObjectPlace::Object(WorldObject &worldObject, bool send) { - WorldPacket::Object(worldObject, send); + ObjectPacket::Object(worldObject, send); RW(worldObject.count, send); RW(worldObject.charge, send); RW(worldObject.enchantmentCharge, send); diff --git a/components/openmw-mp/Packets/World/PacketObjectPlace.hpp b/components/openmw-mp/Packets/Object/PacketObjectPlace.hpp similarity index 71% rename from components/openmw-mp/Packets/World/PacketObjectPlace.hpp rename to components/openmw-mp/Packets/Object/PacketObjectPlace.hpp index 3ee3e4be0..bb3a5de1d 100644 --- a/components/openmw-mp/Packets/World/PacketObjectPlace.hpp +++ b/components/openmw-mp/Packets/Object/PacketObjectPlace.hpp @@ -1,11 +1,11 @@ #ifndef OPENMW_PACKETOBJECTPLACE_HPP #define OPENMW_PACKETOBJECTPLACE_HPP -#include +#include namespace mwmp { - class PacketObjectPlace final: public WorldPacket + class PacketObjectPlace final: public ObjectPacket { public: explicit PacketObjectPlace(RakNet::RakPeerInterface *peer); diff --git a/components/openmw-mp/Packets/World/PacketObjectReset.cpp b/components/openmw-mp/Packets/Object/PacketObjectReset.cpp similarity index 82% rename from components/openmw-mp/Packets/World/PacketObjectReset.cpp rename to components/openmw-mp/Packets/Object/PacketObjectReset.cpp index 7fcce2e39..1d9b81635 100644 --- a/components/openmw-mp/Packets/World/PacketObjectReset.cpp +++ b/components/openmw-mp/Packets/Object/PacketObjectReset.cpp @@ -3,7 +3,7 @@ using namespace mwmp; -PacketObjectReset::PacketObjectReset(RakNet::RakPeerInterface *peer) : WorldPacket(peer) +PacketObjectReset::PacketObjectReset(RakNet::RakPeerInterface *peer) : ObjectPacket(peer) { packetID = ID_OBJECT_RESET; hasCellData = true; @@ -11,6 +11,6 @@ PacketObjectReset::PacketObjectReset(RakNet::RakPeerInterface *peer) : WorldPack void PacketObjectReset::Object(WorldObject &worldObject, bool send) { - WorldPacket::Object(worldObject, send); + ObjectPacket::Object(worldObject, send); // Placeholder } diff --git a/components/openmw-mp/Packets/World/PacketObjectReset.hpp b/components/openmw-mp/Packets/Object/PacketObjectReset.hpp similarity index 71% rename from components/openmw-mp/Packets/World/PacketObjectReset.hpp rename to components/openmw-mp/Packets/Object/PacketObjectReset.hpp index 58df1e6fb..32c0deb5f 100644 --- a/components/openmw-mp/Packets/World/PacketObjectReset.hpp +++ b/components/openmw-mp/Packets/Object/PacketObjectReset.hpp @@ -1,11 +1,11 @@ #ifndef OPENMW_PACKETOBJECTRESET_HPP #define OPENMW_PACKETOBJECTRESET_HPP -#include +#include namespace mwmp { - class PacketObjectReset : public WorldPacket + class PacketObjectReset : public ObjectPacket { public: PacketObjectReset(RakNet::RakPeerInterface *peer); diff --git a/components/openmw-mp/Packets/World/PacketObjectRotate.cpp b/components/openmw-mp/Packets/Object/PacketObjectRotate.cpp similarity index 85% rename from components/openmw-mp/Packets/World/PacketObjectRotate.cpp rename to components/openmw-mp/Packets/Object/PacketObjectRotate.cpp index 07c614654..c7665ab4e 100644 --- a/components/openmw-mp/Packets/World/PacketObjectRotate.cpp +++ b/components/openmw-mp/Packets/Object/PacketObjectRotate.cpp @@ -3,7 +3,7 @@ using namespace mwmp; -PacketObjectRotate::PacketObjectRotate(RakNet::RakPeerInterface *peer) : WorldPacket(peer) +PacketObjectRotate::PacketObjectRotate(RakNet::RakPeerInterface *peer) : ObjectPacket(peer) { packetID = ID_OBJECT_ROTATE; hasCellData = true; @@ -11,7 +11,7 @@ PacketObjectRotate::PacketObjectRotate(RakNet::RakPeerInterface *peer) : WorldPa void PacketObjectRotate::Object(WorldObject &worldObject, bool send) { - WorldPacket::Object(worldObject, send); + ObjectPacket::Object(worldObject, send); RW(worldObject.position.rot[0], send); RW(worldObject.position.rot[1], send); RW(worldObject.position.rot[2], send); diff --git a/components/openmw-mp/Packets/World/PacketObjectRotate.hpp b/components/openmw-mp/Packets/Object/PacketObjectRotate.hpp similarity index 71% rename from components/openmw-mp/Packets/World/PacketObjectRotate.hpp rename to components/openmw-mp/Packets/Object/PacketObjectRotate.hpp index 6720b847e..e7f5438c6 100644 --- a/components/openmw-mp/Packets/World/PacketObjectRotate.hpp +++ b/components/openmw-mp/Packets/Object/PacketObjectRotate.hpp @@ -1,11 +1,11 @@ #ifndef OPENMW_PACKETOBJECTROTATE_HPP #define OPENMW_PACKETOBJECTROTATE_HPP -#include +#include namespace mwmp { - class PacketObjectRotate final: public WorldPacket + class PacketObjectRotate final: public ObjectPacket { public: explicit PacketObjectRotate(RakNet::RakPeerInterface *peer); diff --git a/components/openmw-mp/Packets/World/PacketObjectScale.cpp b/components/openmw-mp/Packets/Object/PacketObjectScale.cpp similarity index 82% rename from components/openmw-mp/Packets/World/PacketObjectScale.cpp rename to components/openmw-mp/Packets/Object/PacketObjectScale.cpp index 8e468059d..5483e39c5 100644 --- a/components/openmw-mp/Packets/World/PacketObjectScale.cpp +++ b/components/openmw-mp/Packets/Object/PacketObjectScale.cpp @@ -3,7 +3,7 @@ using namespace mwmp; -PacketObjectScale::PacketObjectScale(RakNet::RakPeerInterface *peer) : WorldPacket(peer) +PacketObjectScale::PacketObjectScale(RakNet::RakPeerInterface *peer) : ObjectPacket(peer) { packetID = ID_OBJECT_SCALE; hasCellData = true; @@ -11,6 +11,6 @@ PacketObjectScale::PacketObjectScale(RakNet::RakPeerInterface *peer) : WorldPack void PacketObjectScale::Object(WorldObject &worldObject, bool send) { - WorldPacket::Object(worldObject, send); + ObjectPacket::Object(worldObject, send); RW(worldObject.scale, send); } diff --git a/components/openmw-mp/Packets/World/PacketObjectScale.hpp b/components/openmw-mp/Packets/Object/PacketObjectScale.hpp similarity index 71% rename from components/openmw-mp/Packets/World/PacketObjectScale.hpp rename to components/openmw-mp/Packets/Object/PacketObjectScale.hpp index 97a16c516..9e47734d9 100644 --- a/components/openmw-mp/Packets/World/PacketObjectScale.hpp +++ b/components/openmw-mp/Packets/Object/PacketObjectScale.hpp @@ -1,11 +1,11 @@ #ifndef OPENMW_PACKETOBJECTSCALE_HPP #define OPENMW_PACKETOBJECTSCALE_HPP -#include +#include namespace mwmp { - class PacketObjectScale final: public WorldPacket + class PacketObjectScale final: public ObjectPacket { public: explicit PacketObjectScale(RakNet::RakPeerInterface *peer); diff --git a/components/openmw-mp/Packets/World/PacketObjectSpawn.cpp b/components/openmw-mp/Packets/Object/PacketObjectSpawn.cpp similarity index 91% rename from components/openmw-mp/Packets/World/PacketObjectSpawn.cpp rename to components/openmw-mp/Packets/Object/PacketObjectSpawn.cpp index 6d26990f3..00e686e13 100644 --- a/components/openmw-mp/Packets/World/PacketObjectSpawn.cpp +++ b/components/openmw-mp/Packets/Object/PacketObjectSpawn.cpp @@ -3,7 +3,7 @@ using namespace mwmp; -PacketObjectSpawn::PacketObjectSpawn(RakNet::RakPeerInterface *peer) : WorldPacket(peer) +PacketObjectSpawn::PacketObjectSpawn(RakNet::RakPeerInterface *peer) : ObjectPacket(peer) { packetID = ID_OBJECT_SPAWN; hasCellData = true; @@ -11,7 +11,7 @@ PacketObjectSpawn::PacketObjectSpawn(RakNet::RakPeerInterface *peer) : WorldPack void PacketObjectSpawn::Object(WorldObject &worldObject, bool send) { - WorldPacket::Object(worldObject, send); + ObjectPacket::Object(worldObject, send); RW(worldObject.position, send); RW(worldObject.hasMaster, send); diff --git a/components/openmw-mp/Packets/World/PacketObjectSpawn.hpp b/components/openmw-mp/Packets/Object/PacketObjectSpawn.hpp similarity index 71% rename from components/openmw-mp/Packets/World/PacketObjectSpawn.hpp rename to components/openmw-mp/Packets/Object/PacketObjectSpawn.hpp index 2c9040049..0520ee4c6 100644 --- a/components/openmw-mp/Packets/World/PacketObjectSpawn.hpp +++ b/components/openmw-mp/Packets/Object/PacketObjectSpawn.hpp @@ -1,11 +1,11 @@ #ifndef OPENMW_PACKETOBJECTSPAWN_HPP #define OPENMW_PACKETOBJECTSPAWN_HPP -#include +#include namespace mwmp { - class PacketObjectSpawn final: public WorldPacket + class PacketObjectSpawn final: public ObjectPacket { public: explicit PacketObjectSpawn(RakNet::RakPeerInterface *peer); diff --git a/components/openmw-mp/Packets/World/PacketObjectState.cpp b/components/openmw-mp/Packets/Object/PacketObjectState.cpp similarity index 82% rename from components/openmw-mp/Packets/World/PacketObjectState.cpp rename to components/openmw-mp/Packets/Object/PacketObjectState.cpp index 499acb506..1ca4dc338 100644 --- a/components/openmw-mp/Packets/World/PacketObjectState.cpp +++ b/components/openmw-mp/Packets/Object/PacketObjectState.cpp @@ -3,7 +3,7 @@ using namespace mwmp; -PacketObjectState::PacketObjectState(RakNet::RakPeerInterface *peer) : WorldPacket(peer) +PacketObjectState::PacketObjectState(RakNet::RakPeerInterface *peer) : ObjectPacket(peer) { packetID = ID_OBJECT_STATE; hasCellData = true; @@ -11,6 +11,6 @@ PacketObjectState::PacketObjectState(RakNet::RakPeerInterface *peer) : WorldPack void PacketObjectState::Object(WorldObject &worldObject, bool send) { - WorldPacket::Object(worldObject, send); + ObjectPacket::Object(worldObject, send); RW(worldObject.objectState, send); } diff --git a/components/openmw-mp/Packets/World/PacketObjectState.hpp b/components/openmw-mp/Packets/Object/PacketObjectState.hpp similarity index 71% rename from components/openmw-mp/Packets/World/PacketObjectState.hpp rename to components/openmw-mp/Packets/Object/PacketObjectState.hpp index 90c83316c..fc177f1e3 100644 --- a/components/openmw-mp/Packets/World/PacketObjectState.hpp +++ b/components/openmw-mp/Packets/Object/PacketObjectState.hpp @@ -1,11 +1,11 @@ #ifndef OPENMW_PACKETOBJECTSTATE_HPP #define OPENMW_PACKETOBJECTSTATE_HPP -#include +#include namespace mwmp { - class PacketObjectState final: public WorldPacket + class PacketObjectState final: public ObjectPacket { public: explicit PacketObjectState(RakNet::RakPeerInterface *peer); diff --git a/components/openmw-mp/Packets/World/PacketObjectTrap.cpp b/components/openmw-mp/Packets/Object/PacketObjectTrap.cpp similarity index 85% rename from components/openmw-mp/Packets/World/PacketObjectTrap.cpp rename to components/openmw-mp/Packets/Object/PacketObjectTrap.cpp index 4442f3cd2..832618c91 100644 --- a/components/openmw-mp/Packets/World/PacketObjectTrap.cpp +++ b/components/openmw-mp/Packets/Object/PacketObjectTrap.cpp @@ -3,7 +3,7 @@ using namespace mwmp; -PacketObjectTrap::PacketObjectTrap(RakNet::RakPeerInterface *peer) : WorldPacket(peer) +PacketObjectTrap::PacketObjectTrap(RakNet::RakPeerInterface *peer) : ObjectPacket(peer) { packetID = ID_OBJECT_TRAP; hasCellData = true; @@ -11,7 +11,7 @@ PacketObjectTrap::PacketObjectTrap(RakNet::RakPeerInterface *peer) : WorldPacket void PacketObjectTrap::Object(WorldObject &worldObject, bool send) { - WorldPacket::Object(worldObject, send); + ObjectPacket::Object(worldObject, send); RW(worldObject.isDisarmed, send); if (!worldObject.isDisarmed) diff --git a/components/openmw-mp/Packets/World/PacketObjectTrap.hpp b/components/openmw-mp/Packets/Object/PacketObjectTrap.hpp similarity index 71% rename from components/openmw-mp/Packets/World/PacketObjectTrap.hpp rename to components/openmw-mp/Packets/Object/PacketObjectTrap.hpp index ab5dac8ea..af1dd5d05 100644 --- a/components/openmw-mp/Packets/World/PacketObjectTrap.hpp +++ b/components/openmw-mp/Packets/Object/PacketObjectTrap.hpp @@ -1,11 +1,11 @@ #ifndef OPENMW_PACKETOBJECTTRAP_HPP #define OPENMW_PACKETOBJECTTRAP_HPP -#include +#include namespace mwmp { - class PacketObjectTrap final: public WorldPacket + class PacketObjectTrap final: public ObjectPacket { public: explicit PacketObjectTrap(RakNet::RakPeerInterface *peer); diff --git a/components/openmw-mp/Packets/World/PacketScriptGlobalFloat.cpp b/components/openmw-mp/Packets/Object/PacketScriptGlobalFloat.cpp similarity index 90% rename from components/openmw-mp/Packets/World/PacketScriptGlobalFloat.cpp rename to components/openmw-mp/Packets/Object/PacketScriptGlobalFloat.cpp index c4a65a267..5c6c39756 100644 --- a/components/openmw-mp/Packets/World/PacketScriptGlobalFloat.cpp +++ b/components/openmw-mp/Packets/Object/PacketScriptGlobalFloat.cpp @@ -3,7 +3,7 @@ using namespace mwmp; -PacketScriptGlobalFloat::PacketScriptGlobalFloat(RakNet::RakPeerInterface *peer) : WorldPacket(peer) +PacketScriptGlobalFloat::PacketScriptGlobalFloat(RakNet::RakPeerInterface *peer) : ObjectPacket(peer) { packetID = ID_SCRIPT_GLOBAL_FLOAT; } diff --git a/components/openmw-mp/Packets/World/PacketScriptGlobalFloat.hpp b/components/openmw-mp/Packets/Object/PacketScriptGlobalFloat.hpp similarity index 72% rename from components/openmw-mp/Packets/World/PacketScriptGlobalFloat.hpp rename to components/openmw-mp/Packets/Object/PacketScriptGlobalFloat.hpp index a457ff7dc..9c59099b8 100644 --- a/components/openmw-mp/Packets/World/PacketScriptGlobalFloat.hpp +++ b/components/openmw-mp/Packets/Object/PacketScriptGlobalFloat.hpp @@ -1,11 +1,11 @@ #ifndef OPENMW_PACKETSCRIPTGLOBALFLOAT_HPP #define OPENMW_PACKETSCRIPTGLOBALFLOAT_HPP -#include +#include namespace mwmp { - class PacketScriptGlobalFloat : public WorldPacket + class PacketScriptGlobalFloat : public ObjectPacket { public: PacketScriptGlobalFloat(RakNet::RakPeerInterface *peer); diff --git a/components/openmw-mp/Packets/World/PacketScriptGlobalShort.cpp b/components/openmw-mp/Packets/Object/PacketScriptGlobalShort.cpp similarity index 90% rename from components/openmw-mp/Packets/World/PacketScriptGlobalShort.cpp rename to components/openmw-mp/Packets/Object/PacketScriptGlobalShort.cpp index 0ebd3ff7f..f30f49bba 100644 --- a/components/openmw-mp/Packets/World/PacketScriptGlobalShort.cpp +++ b/components/openmw-mp/Packets/Object/PacketScriptGlobalShort.cpp @@ -3,7 +3,7 @@ using namespace mwmp; -PacketScriptGlobalShort::PacketScriptGlobalShort(RakNet::RakPeerInterface *peer) : WorldPacket(peer) +PacketScriptGlobalShort::PacketScriptGlobalShort(RakNet::RakPeerInterface *peer) : ObjectPacket(peer) { packetID = ID_SCRIPT_GLOBAL_SHORT; } diff --git a/components/openmw-mp/Packets/World/PacketScriptGlobalShort.hpp b/components/openmw-mp/Packets/Object/PacketScriptGlobalShort.hpp similarity index 71% rename from components/openmw-mp/Packets/World/PacketScriptGlobalShort.hpp rename to components/openmw-mp/Packets/Object/PacketScriptGlobalShort.hpp index f1bfa2861..ce7157c40 100644 --- a/components/openmw-mp/Packets/World/PacketScriptGlobalShort.hpp +++ b/components/openmw-mp/Packets/Object/PacketScriptGlobalShort.hpp @@ -1,11 +1,11 @@ #ifndef OPENMW_PACKETSCRIPTGLOBALSHORT_HPP #define OPENMW_PACKETSCRIPTGLOBALSHORT_HPP -#include +#include namespace mwmp { - class PacketScriptGlobalShort final: public WorldPacket + class PacketScriptGlobalShort final: public ObjectPacket { public: explicit PacketScriptGlobalShort(RakNet::RakPeerInterface *peer); diff --git a/components/openmw-mp/Packets/World/PacketScriptLocalFloat.cpp b/components/openmw-mp/Packets/Object/PacketScriptLocalFloat.cpp similarity index 82% rename from components/openmw-mp/Packets/World/PacketScriptLocalFloat.cpp rename to components/openmw-mp/Packets/Object/PacketScriptLocalFloat.cpp index c7109b185..32eb34d21 100644 --- a/components/openmw-mp/Packets/World/PacketScriptLocalFloat.cpp +++ b/components/openmw-mp/Packets/Object/PacketScriptLocalFloat.cpp @@ -3,7 +3,7 @@ using namespace mwmp; -PacketScriptLocalFloat::PacketScriptLocalFloat(RakNet::RakPeerInterface *peer) : WorldPacket(peer) +PacketScriptLocalFloat::PacketScriptLocalFloat(RakNet::RakPeerInterface *peer) : ObjectPacket(peer) { packetID = ID_SCRIPT_LOCAL_FLOAT; hasCellData = true; @@ -11,7 +11,7 @@ PacketScriptLocalFloat::PacketScriptLocalFloat(RakNet::RakPeerInterface *peer) : void PacketScriptLocalFloat::Object(WorldObject &worldObject, bool send) { - WorldPacket::Object(worldObject, send); + ObjectPacket::Object(worldObject, send); RW(worldObject.index, send); RW(worldObject.floatVal, send); } diff --git a/components/openmw-mp/Packets/World/PacketScriptLocalFloat.hpp b/components/openmw-mp/Packets/Object/PacketScriptLocalFloat.hpp similarity index 71% rename from components/openmw-mp/Packets/World/PacketScriptLocalFloat.hpp rename to components/openmw-mp/Packets/Object/PacketScriptLocalFloat.hpp index 83791c251..04e66ac32 100644 --- a/components/openmw-mp/Packets/World/PacketScriptLocalFloat.hpp +++ b/components/openmw-mp/Packets/Object/PacketScriptLocalFloat.hpp @@ -1,11 +1,11 @@ #ifndef OPENMW_PACKETSCRIPTLOCALFLOAT_HPP #define OPENMW_PACKETSCRIPTLOCALFLOAT_HPP -#include +#include namespace mwmp { - class PacketScriptLocalFloat final: public WorldPacket + class PacketScriptLocalFloat final: public ObjectPacket { public: explicit PacketScriptLocalFloat(RakNet::RakPeerInterface *peer); diff --git a/components/openmw-mp/Packets/World/PacketScriptLocalShort.cpp b/components/openmw-mp/Packets/Object/PacketScriptLocalShort.cpp similarity index 82% rename from components/openmw-mp/Packets/World/PacketScriptLocalShort.cpp rename to components/openmw-mp/Packets/Object/PacketScriptLocalShort.cpp index fb739dc45..ae6b7caca 100644 --- a/components/openmw-mp/Packets/World/PacketScriptLocalShort.cpp +++ b/components/openmw-mp/Packets/Object/PacketScriptLocalShort.cpp @@ -3,7 +3,7 @@ using namespace mwmp; -PacketScriptLocalShort::PacketScriptLocalShort(RakNet::RakPeerInterface *peer) : WorldPacket(peer) +PacketScriptLocalShort::PacketScriptLocalShort(RakNet::RakPeerInterface *peer) : ObjectPacket(peer) { packetID = ID_SCRIPT_LOCAL_SHORT; hasCellData = true; @@ -11,7 +11,7 @@ PacketScriptLocalShort::PacketScriptLocalShort(RakNet::RakPeerInterface *peer) : void PacketScriptLocalShort::Object(WorldObject &worldObject, bool send) { - WorldPacket::Object(worldObject, send); + ObjectPacket::Object(worldObject, send); RW(worldObject.index, send); RW(worldObject.shortVal, send); } diff --git a/components/openmw-mp/Packets/World/PacketScriptLocalShort.hpp b/components/openmw-mp/Packets/Object/PacketScriptLocalShort.hpp similarity index 71% rename from components/openmw-mp/Packets/World/PacketScriptLocalShort.hpp rename to components/openmw-mp/Packets/Object/PacketScriptLocalShort.hpp index 9f857b1b4..52e169039 100644 --- a/components/openmw-mp/Packets/World/PacketScriptLocalShort.hpp +++ b/components/openmw-mp/Packets/Object/PacketScriptLocalShort.hpp @@ -1,11 +1,11 @@ #ifndef OPENMW_PACKETSCRIPTLOCALSHORT_HPP #define OPENMW_PACKETSCRIPTLOCALSHORT_HPP -#include +#include namespace mwmp { - class PacketScriptLocalShort final: public WorldPacket + class PacketScriptLocalShort final: public ObjectPacket { public: explicit PacketScriptLocalShort(RakNet::RakPeerInterface *peer); diff --git a/components/openmw-mp/Packets/World/PacketScriptMemberFloat.cpp b/components/openmw-mp/Packets/Object/PacketScriptMemberFloat.cpp similarity index 91% rename from components/openmw-mp/Packets/World/PacketScriptMemberFloat.cpp rename to components/openmw-mp/Packets/Object/PacketScriptMemberFloat.cpp index 61161054d..187ff9d3f 100644 --- a/components/openmw-mp/Packets/World/PacketScriptMemberFloat.cpp +++ b/components/openmw-mp/Packets/Object/PacketScriptMemberFloat.cpp @@ -3,7 +3,7 @@ using namespace mwmp; -PacketScriptMemberFloat::PacketScriptMemberFloat(RakNet::RakPeerInterface *peer) : WorldPacket(peer) +PacketScriptMemberFloat::PacketScriptMemberFloat(RakNet::RakPeerInterface *peer) : ObjectPacket(peer) { packetID = ID_SCRIPT_MEMBER_FLOAT; } diff --git a/components/openmw-mp/Packets/World/PacketScriptMemberFloat.hpp b/components/openmw-mp/Packets/Object/PacketScriptMemberFloat.hpp similarity index 71% rename from components/openmw-mp/Packets/World/PacketScriptMemberFloat.hpp rename to components/openmw-mp/Packets/Object/PacketScriptMemberFloat.hpp index 2b6f9ae2a..ccd7a49be 100644 --- a/components/openmw-mp/Packets/World/PacketScriptMemberFloat.hpp +++ b/components/openmw-mp/Packets/Object/PacketScriptMemberFloat.hpp @@ -1,11 +1,11 @@ #ifndef OPENMW_PACKETSCRIPTMEMBERFLOAT_HPP #define OPENMW_PACKETSCRIPTMEMBERFLOAT_HPP -#include +#include namespace mwmp { - class PacketScriptMemberFloat : public WorldPacket + class PacketScriptMemberFloat : public ObjectPacket { public: PacketScriptMemberFloat(RakNet::RakPeerInterface *peer); diff --git a/components/openmw-mp/Packets/World/PacketScriptMemberShort.cpp b/components/openmw-mp/Packets/Object/PacketScriptMemberShort.cpp similarity index 91% rename from components/openmw-mp/Packets/World/PacketScriptMemberShort.cpp rename to components/openmw-mp/Packets/Object/PacketScriptMemberShort.cpp index c2b1c34d6..e7d038a7e 100644 --- a/components/openmw-mp/Packets/World/PacketScriptMemberShort.cpp +++ b/components/openmw-mp/Packets/Object/PacketScriptMemberShort.cpp @@ -3,7 +3,7 @@ using namespace mwmp; -PacketScriptMemberShort::PacketScriptMemberShort(RakNet::RakPeerInterface *peer) : WorldPacket(peer) +PacketScriptMemberShort::PacketScriptMemberShort(RakNet::RakPeerInterface *peer) : ObjectPacket(peer) { packetID = ID_SCRIPT_MEMBER_SHORT; } diff --git a/components/openmw-mp/Packets/World/PacketScriptMemberShort.hpp b/components/openmw-mp/Packets/Object/PacketScriptMemberShort.hpp similarity index 71% rename from components/openmw-mp/Packets/World/PacketScriptMemberShort.hpp rename to components/openmw-mp/Packets/Object/PacketScriptMemberShort.hpp index e55d97bf3..38588a808 100644 --- a/components/openmw-mp/Packets/World/PacketScriptMemberShort.hpp +++ b/components/openmw-mp/Packets/Object/PacketScriptMemberShort.hpp @@ -1,11 +1,11 @@ #ifndef OPENMW_PACKETSCRIPTMEMBERSHORT_HPP #define OPENMW_PACKETSCRIPTMEMBERSHORT_HPP -#include +#include namespace mwmp { - class PacketScriptMemberShort final: public WorldPacket + class PacketScriptMemberShort final: public ObjectPacket { public: explicit PacketScriptMemberShort(RakNet::RakPeerInterface *peer); diff --git a/components/openmw-mp/Packets/World/PacketVideoPlay.cpp b/components/openmw-mp/Packets/Object/PacketVideoPlay.cpp similarity index 94% rename from components/openmw-mp/Packets/World/PacketVideoPlay.cpp rename to components/openmw-mp/Packets/Object/PacketVideoPlay.cpp index bc5146ce8..d0cae224b 100644 --- a/components/openmw-mp/Packets/World/PacketVideoPlay.cpp +++ b/components/openmw-mp/Packets/Object/PacketVideoPlay.cpp @@ -3,7 +3,7 @@ using namespace mwmp; -PacketVideoPlay::PacketVideoPlay(RakNet::RakPeerInterface *peer) : WorldPacket(peer) +PacketVideoPlay::PacketVideoPlay(RakNet::RakPeerInterface *peer) : ObjectPacket(peer) { packetID = ID_VIDEO_PLAY; } diff --git a/components/openmw-mp/Packets/World/PacketVideoPlay.hpp b/components/openmw-mp/Packets/Object/PacketVideoPlay.hpp similarity index 70% rename from components/openmw-mp/Packets/World/PacketVideoPlay.hpp rename to components/openmw-mp/Packets/Object/PacketVideoPlay.hpp index 14de3ca3f..dffc355f8 100644 --- a/components/openmw-mp/Packets/World/PacketVideoPlay.hpp +++ b/components/openmw-mp/Packets/Object/PacketVideoPlay.hpp @@ -1,11 +1,11 @@ #ifndef OPENMW_PACKETVIDEOPLAY_HPP #define OPENMW_PACKETVIDEOPLAY_HPP -#include +#include namespace mwmp { - class PacketVideoPlay final: public WorldPacket + class PacketVideoPlay final: public ObjectPacket { public: explicit PacketVideoPlay(RakNet::RakPeerInterface *peer);