From c55f0f73b8208f61b534ec34318a3469df85995f Mon Sep 17 00:00:00 2001 From: Koncord Date: Fri, 8 Dec 2017 07:32:39 +0800 Subject: [PATCH] [Server] Pass shared_ptr by reference --- apps/openmw-mp/processors/ActorProcessor.cpp | 2 +- apps/openmw-mp/processors/ActorProcessor.hpp | 2 +- apps/openmw-mp/processors/PlayerProcessor.hpp | 2 +- apps/openmw-mp/processors/WorldProcessor.cpp | 2 +- apps/openmw-mp/processors/WorldProcessor.hpp | 2 +- apps/openmw-mp/processors/actor/ProcessorActorAI.hpp | 2 +- apps/openmw-mp/processors/actor/ProcessorActorAnimFlags.hpp | 2 +- apps/openmw-mp/processors/actor/ProcessorActorAnimPlay.hpp | 2 +- apps/openmw-mp/processors/actor/ProcessorActorAttack.hpp | 2 +- .../openmw-mp/processors/actor/ProcessorActorCellChange.hpp | 2 +- apps/openmw-mp/processors/actor/ProcessorActorDeath.hpp | 2 +- apps/openmw-mp/processors/actor/ProcessorActorEquipment.hpp | 2 +- apps/openmw-mp/processors/actor/ProcessorActorList.hpp | 2 +- apps/openmw-mp/processors/actor/ProcessorActorPosition.hpp | 2 +- apps/openmw-mp/processors/actor/ProcessorActorSpeech.hpp | 2 +- .../processors/actor/ProcessorActorStatsDynamic.hpp | 2 +- apps/openmw-mp/processors/actor/ProcessorActorTest.hpp | 2 +- apps/openmw-mp/processors/player/ProcessorChatMsg.hpp | 2 +- apps/openmw-mp/processors/player/ProcessorGUIMessageBox.hpp | 2 +- apps/openmw-mp/processors/player/ProcessorGUIWindow.hpp | 2 +- apps/openmw-mp/processors/player/ProcessorGameWeather.hpp | 6 ++++-- .../processors/player/ProcessorPlayerAnimFlags.hpp | 2 +- .../openmw-mp/processors/player/ProcessorPlayerAnimPlay.hpp | 2 +- apps/openmw-mp/processors/player/ProcessorPlayerAttack.hpp | 2 +- .../processors/player/ProcessorPlayerAttribute.hpp | 2 +- apps/openmw-mp/processors/player/ProcessorPlayerBook.hpp | 2 +- apps/openmw-mp/processors/player/ProcessorPlayerBounty.hpp | 2 +- .../processors/player/ProcessorPlayerCellChange.hpp | 2 +- .../processors/player/ProcessorPlayerCellState.hpp | 2 +- .../processors/player/ProcessorPlayerCharClass.hpp | 2 +- apps/openmw-mp/processors/player/ProcessorPlayerCharGen.hpp | 2 +- apps/openmw-mp/processors/player/ProcessorPlayerDeath.hpp | 2 +- .../processors/player/ProcessorPlayerDisposition.hpp | 2 +- .../processors/player/ProcessorPlayerEquipment.hpp | 2 +- apps/openmw-mp/processors/player/ProcessorPlayerFaction.hpp | 2 +- .../processors/player/ProcessorPlayerInventory.hpp | 2 +- apps/openmw-mp/processors/player/ProcessorPlayerJournal.hpp | 2 +- .../processors/player/ProcessorPlayerKillCount.hpp | 2 +- apps/openmw-mp/processors/player/ProcessorPlayerLevel.hpp | 2 +- apps/openmw-mp/processors/player/ProcessorPlayerMap.hpp | 2 +- .../openmw-mp/processors/player/ProcessorPlayerPosition.hpp | 2 +- apps/openmw-mp/processors/player/ProcessorPlayerRest.hpp | 2 +- .../processors/player/ProcessorPlayerResurrect.hpp | 2 +- .../processors/player/ProcessorPlayerShapeshift.hpp | 2 +- apps/openmw-mp/processors/player/ProcessorPlayerSkill.hpp | 2 +- apps/openmw-mp/processors/player/ProcessorPlayerSpeech.hpp | 2 +- .../processors/player/ProcessorPlayerSpellbook.hpp | 2 +- .../processors/player/ProcessorPlayerStatsDynamic.hpp | 2 +- apps/openmw-mp/processors/player/ProcessorPlayerTopic.hpp | 2 +- apps/openmw-mp/processors/world/ProcessorContainer.hpp | 2 +- apps/openmw-mp/processors/world/ProcessorDoorState.hpp | 2 +- apps/openmw-mp/processors/world/ProcessorObjectDelete.hpp | 2 +- apps/openmw-mp/processors/world/ProcessorObjectLock.hpp | 2 +- apps/openmw-mp/processors/world/ProcessorObjectPlace.hpp | 2 +- apps/openmw-mp/processors/world/ProcessorObjectScale.hpp | 2 +- apps/openmw-mp/processors/world/ProcessorObjectSpawn.hpp | 2 +- apps/openmw-mp/processors/world/ProcessorObjectState.hpp | 2 +- apps/openmw-mp/processors/world/ProcessorObjectTrap.hpp | 2 +- 58 files changed, 61 insertions(+), 59 deletions(-) diff --git a/apps/openmw-mp/processors/ActorProcessor.cpp b/apps/openmw-mp/processors/ActorProcessor.cpp index 5c6cd9042..0af599088 100644 --- a/apps/openmw-mp/processors/ActorProcessor.cpp +++ b/apps/openmw-mp/processors/ActorProcessor.cpp @@ -6,7 +6,7 @@ using namespace mwmp; template typename BasePacketProcessor::processors_t BasePacketProcessor::processors; -void ActorProcessor::Do(ActorPacket &packet, std::shared_ptr player, BaseActorList &actorList) +void ActorProcessor::Do(ActorPacket &packet, const std::shared_ptr &player, BaseActorList &actorList) { packet.Send(true); } diff --git a/apps/openmw-mp/processors/ActorProcessor.hpp b/apps/openmw-mp/processors/ActorProcessor.hpp index 18d2a0a64..e48687e90 100644 --- a/apps/openmw-mp/processors/ActorProcessor.hpp +++ b/apps/openmw-mp/processors/ActorProcessor.hpp @@ -14,7 +14,7 @@ namespace mwmp { public: - virtual void Do(ActorPacket &packet, std::shared_ptr player, BaseActorList &actorList); + virtual void Do(ActorPacket &packet, const std::shared_ptr &player, BaseActorList &actorList); static bool Process(RakNet::Packet &packet, BaseActorList &actorList) noexcept; }; diff --git a/apps/openmw-mp/processors/PlayerProcessor.hpp b/apps/openmw-mp/processors/PlayerProcessor.hpp index 22e41ae6d..e4e69779e 100644 --- a/apps/openmw-mp/processors/PlayerProcessor.hpp +++ b/apps/openmw-mp/processors/PlayerProcessor.hpp @@ -18,7 +18,7 @@ namespace mwmp { public: - virtual void Do(PlayerPacket &packet, std::shared_ptr player) = 0; + virtual void Do(PlayerPacket &packet, const std::shared_ptr &player) = 0; static bool Process(RakNet::Packet &packet) noexcept; }; diff --git a/apps/openmw-mp/processors/WorldProcessor.cpp b/apps/openmw-mp/processors/WorldProcessor.cpp index d81d6ca45..53ade2cdf 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, std::shared_ptr player, BaseEvent &event) +void WorldProcessor::Do(WorldPacket &packet, const std::shared_ptr &player, BaseEvent &event) { packet.Send(true); } diff --git a/apps/openmw-mp/processors/WorldProcessor.hpp b/apps/openmw-mp/processors/WorldProcessor.hpp index 6a25f3f7b..0eb23bbb1 100644 --- a/apps/openmw-mp/processors/WorldProcessor.hpp +++ b/apps/openmw-mp/processors/WorldProcessor.hpp @@ -18,7 +18,7 @@ namespace mwmp { public: - virtual void Do(WorldPacket &packet, std::shared_ptr player, BaseEvent &event); + virtual void Do(WorldPacket &packet, const std::shared_ptr &player, BaseEvent &event); static bool Process(RakNet::Packet &packet, BaseEvent &event) noexcept; }; diff --git a/apps/openmw-mp/processors/actor/ProcessorActorAI.hpp b/apps/openmw-mp/processors/actor/ProcessorActorAI.hpp index 2eb75f116..bf4baf21b 100644 --- a/apps/openmw-mp/processors/actor/ProcessorActorAI.hpp +++ b/apps/openmw-mp/processors/actor/ProcessorActorAI.hpp @@ -13,7 +13,7 @@ namespace mwmp BPP_INIT(ID_ACTOR_AI) } - void Do(ActorPacket &packet, std::shared_ptr player, BaseActorList &actorList) override + void Do(ActorPacket &packet, const std::shared_ptr &player, BaseActorList &actorList) override { // Send only to players who have the cell loaded Cell *serverCell = CellController::get()->getCell(&actorList.cell); diff --git a/apps/openmw-mp/processors/actor/ProcessorActorAnimFlags.hpp b/apps/openmw-mp/processors/actor/ProcessorActorAnimFlags.hpp index fe39131f8..869aeb4e4 100644 --- a/apps/openmw-mp/processors/actor/ProcessorActorAnimFlags.hpp +++ b/apps/openmw-mp/processors/actor/ProcessorActorAnimFlags.hpp @@ -13,7 +13,7 @@ namespace mwmp BPP_INIT(ID_ACTOR_ANIM_FLAGS) } - void Do(ActorPacket &packet, std::shared_ptr player, BaseActorList &actorList) override + void Do(ActorPacket &packet, const std::shared_ptr &player, BaseActorList &actorList) override { // Send only to players who have the cell loaded Cell *serverCell = CellController::get()->getCell(&actorList.cell); diff --git a/apps/openmw-mp/processors/actor/ProcessorActorAnimPlay.hpp b/apps/openmw-mp/processors/actor/ProcessorActorAnimPlay.hpp index 0b1f26df6..886b8fb60 100644 --- a/apps/openmw-mp/processors/actor/ProcessorActorAnimPlay.hpp +++ b/apps/openmw-mp/processors/actor/ProcessorActorAnimPlay.hpp @@ -13,7 +13,7 @@ namespace mwmp BPP_INIT(ID_ACTOR_ANIM_PLAY) } - void Do(ActorPacket &packet, std::shared_ptr player, BaseActorList &actorList) override + void Do(ActorPacket &packet, const std::shared_ptr &player, BaseActorList &actorList) override { // Send only to players who have the cell loaded Cell *serverCell = CellController::get()->getCell(&actorList.cell); diff --git a/apps/openmw-mp/processors/actor/ProcessorActorAttack.hpp b/apps/openmw-mp/processors/actor/ProcessorActorAttack.hpp index a3d214ba0..9594a9720 100644 --- a/apps/openmw-mp/processors/actor/ProcessorActorAttack.hpp +++ b/apps/openmw-mp/processors/actor/ProcessorActorAttack.hpp @@ -13,7 +13,7 @@ namespace mwmp BPP_INIT(ID_ACTOR_ATTACK) } - void Do(ActorPacket &packet, std::shared_ptr player, BaseActorList &actorList) override + void Do(ActorPacket &packet, const std::shared_ptr &player, BaseActorList &actorList) override { // Send only to players who have the cell loaded Cell *serverCell = CellController::get()->getCell(&actorList.cell); diff --git a/apps/openmw-mp/processors/actor/ProcessorActorCellChange.hpp b/apps/openmw-mp/processors/actor/ProcessorActorCellChange.hpp index 5accfa1c1..19a3f6269 100644 --- a/apps/openmw-mp/processors/actor/ProcessorActorCellChange.hpp +++ b/apps/openmw-mp/processors/actor/ProcessorActorCellChange.hpp @@ -13,7 +13,7 @@ namespace mwmp BPP_INIT(ID_ACTOR_CELL_CHANGE) } - void Do(ActorPacket &packet, std::shared_ptr player, BaseActorList &actorList) override + void Do(ActorPacket &packet, const std::shared_ptr &player, BaseActorList &actorList) override { Cell *serverCell = CellController::get()->getCell(&actorList.cell); diff --git a/apps/openmw-mp/processors/actor/ProcessorActorDeath.hpp b/apps/openmw-mp/processors/actor/ProcessorActorDeath.hpp index 2d0d549ab..9533619d8 100644 --- a/apps/openmw-mp/processors/actor/ProcessorActorDeath.hpp +++ b/apps/openmw-mp/processors/actor/ProcessorActorDeath.hpp @@ -13,7 +13,7 @@ namespace mwmp BPP_INIT(ID_ACTOR_DEATH) } - void Do(ActorPacket &packet, std::shared_ptr player, BaseActorList &actorList) override + void Do(ActorPacket &packet, const std::shared_ptr &player, BaseActorList &actorList) override { // Send only to players who have the cell loaded Cell *serverCell = CellController::get()->getCell(&actorList.cell); diff --git a/apps/openmw-mp/processors/actor/ProcessorActorEquipment.hpp b/apps/openmw-mp/processors/actor/ProcessorActorEquipment.hpp index a947dddc0..400a0a3c1 100644 --- a/apps/openmw-mp/processors/actor/ProcessorActorEquipment.hpp +++ b/apps/openmw-mp/processors/actor/ProcessorActorEquipment.hpp @@ -14,7 +14,7 @@ namespace mwmp BPP_INIT(ID_ACTOR_EQUIPMENT) } - void Do(ActorPacket &packet, std::shared_ptr player, BaseActorList &actorList) override + void Do(ActorPacket &packet, const std::shared_ptr &player, BaseActorList &actorList) override { std::vector> actors; diff --git a/apps/openmw-mp/processors/actor/ProcessorActorList.hpp b/apps/openmw-mp/processors/actor/ProcessorActorList.hpp index 058a19773..33687466e 100644 --- a/apps/openmw-mp/processors/actor/ProcessorActorList.hpp +++ b/apps/openmw-mp/processors/actor/ProcessorActorList.hpp @@ -13,7 +13,7 @@ namespace mwmp BPP_INIT(ID_ACTOR_LIST) } - void Do(ActorPacket &packet, std::shared_ptr player, BaseActorList &actorList) override + void Do(ActorPacket &packet, const std::shared_ptr &player, BaseActorList &actorList) 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/actor/ProcessorActorPosition.hpp b/apps/openmw-mp/processors/actor/ProcessorActorPosition.hpp index 6490db547..2a4c11d0b 100644 --- a/apps/openmw-mp/processors/actor/ProcessorActorPosition.hpp +++ b/apps/openmw-mp/processors/actor/ProcessorActorPosition.hpp @@ -13,7 +13,7 @@ namespace mwmp BPP_INIT(ID_ACTOR_POSITION) } - void Do(ActorPacket &packet, std::shared_ptr player, BaseActorList &actorList) override + void Do(ActorPacket &packet, const std::shared_ptr &player, BaseActorList &actorList) override { // Send only to players who have the cell loaded Cell *serverCell = CellController::get()->getCell(&actorList.cell); diff --git a/apps/openmw-mp/processors/actor/ProcessorActorSpeech.hpp b/apps/openmw-mp/processors/actor/ProcessorActorSpeech.hpp index bd2e289f4..67bca50b6 100644 --- a/apps/openmw-mp/processors/actor/ProcessorActorSpeech.hpp +++ b/apps/openmw-mp/processors/actor/ProcessorActorSpeech.hpp @@ -13,7 +13,7 @@ namespace mwmp BPP_INIT(ID_ACTOR_SPEECH) } - void Do(ActorPacket &packet, std::shared_ptr player, BaseActorList &actorList) override + void Do(ActorPacket &packet, const std::shared_ptr &player, BaseActorList &actorList) override { // Send only to players who have the cell loaded Cell *serverCell = CellController::get()->getCell(&actorList.cell); diff --git a/apps/openmw-mp/processors/actor/ProcessorActorStatsDynamic.hpp b/apps/openmw-mp/processors/actor/ProcessorActorStatsDynamic.hpp index 46b0612d2..ce7c45c0c 100644 --- a/apps/openmw-mp/processors/actor/ProcessorActorStatsDynamic.hpp +++ b/apps/openmw-mp/processors/actor/ProcessorActorStatsDynamic.hpp @@ -13,7 +13,7 @@ namespace mwmp BPP_INIT(ID_ACTOR_STATS_DYNAMIC) } - void Do(ActorPacket &packet, std::shared_ptr player, BaseActorList &actorList) override + void Do(ActorPacket &packet, const std::shared_ptr &player, BaseActorList &actorList) override { // Send only to players who have the cell loaded Cell *serverCell = CellController::get()->getCell(&actorList.cell); diff --git a/apps/openmw-mp/processors/actor/ProcessorActorTest.hpp b/apps/openmw-mp/processors/actor/ProcessorActorTest.hpp index 4c0f2d782..782f6e46e 100644 --- a/apps/openmw-mp/processors/actor/ProcessorActorTest.hpp +++ b/apps/openmw-mp/processors/actor/ProcessorActorTest.hpp @@ -13,7 +13,7 @@ namespace mwmp BPP_INIT(ID_ACTOR_TEST) } - void Do(ActorPacket &packet, std::shared_ptr player, BaseActorList &actorList) override + void Do(ActorPacket &packet, const std::shared_ptr &player, BaseActorList &actorList) override { std::vector> actors; diff --git a/apps/openmw-mp/processors/player/ProcessorChatMsg.hpp b/apps/openmw-mp/processors/player/ProcessorChatMsg.hpp index 29d938f54..ba97b1262 100644 --- a/apps/openmw-mp/processors/player/ProcessorChatMsg.hpp +++ b/apps/openmw-mp/processors/player/ProcessorChatMsg.hpp @@ -17,7 +17,7 @@ namespace mwmp BPP_INIT(ID_CHAT_MESSAGE) } - void Do(PlayerPacket &packet, std::shared_ptr player) override + void Do(PlayerPacket &packet, const std::shared_ptr &player) override { DEBUG_PRINTF(strPacketID.c_str()); diff --git a/apps/openmw-mp/processors/player/ProcessorGUIMessageBox.hpp b/apps/openmw-mp/processors/player/ProcessorGUIMessageBox.hpp index 39c614f67..91c918897 100644 --- a/apps/openmw-mp/processors/player/ProcessorGUIMessageBox.hpp +++ b/apps/openmw-mp/processors/player/ProcessorGUIMessageBox.hpp @@ -17,7 +17,7 @@ namespace mwmp BPP_INIT(ID_GUI_MESSAGEBOX) } - void Do(PlayerPacket &packet, std::shared_ptr player) override + void Do(PlayerPacket &packet, const std::shared_ptr &player) override { DEBUG_PRINTF(strPacketID.c_str()); diff --git a/apps/openmw-mp/processors/player/ProcessorGUIWindow.hpp b/apps/openmw-mp/processors/player/ProcessorGUIWindow.hpp index 05c7845db..7efa6445d 100644 --- a/apps/openmw-mp/processors/player/ProcessorGUIWindow.hpp +++ b/apps/openmw-mp/processors/player/ProcessorGUIWindow.hpp @@ -17,7 +17,7 @@ namespace mwmp BPP_INIT(ID_GUI_WINDOW) } - void Do(PlayerPacket &packet, std::shared_ptr player) override + void Do(PlayerPacket &packet, const std::shared_ptr &player) override { DEBUG_PRINTF(strPacketID.c_str()); diff --git a/apps/openmw-mp/processors/player/ProcessorGameWeather.hpp b/apps/openmw-mp/processors/player/ProcessorGameWeather.hpp index 5ba3f0992..3930a803e 100644 --- a/apps/openmw-mp/processors/player/ProcessorGameWeather.hpp +++ b/apps/openmw-mp/processors/player/ProcessorGameWeather.hpp @@ -13,9 +13,11 @@ namespace mwmp BPP_INIT(ID_GAME_WEATHER) } - void Do(PlayerPacket &packet, std::shared_ptr player) override + void Do(PlayerPacket &packet, const std::shared_ptr &player) final { - // Placeholder to be filled in later + DEBUG_PRINTF(strPacketID); + + Networking::get().getState().getEventCtrl().Call(player); } }; } diff --git a/apps/openmw-mp/processors/player/ProcessorPlayerAnimFlags.hpp b/apps/openmw-mp/processors/player/ProcessorPlayerAnimFlags.hpp index 2f7e27984..aff09987b 100644 --- a/apps/openmw-mp/processors/player/ProcessorPlayerAnimFlags.hpp +++ b/apps/openmw-mp/processors/player/ProcessorPlayerAnimFlags.hpp @@ -17,7 +17,7 @@ namespace mwmp BPP_INIT(ID_PLAYER_ANIM_FLAGS) } - void Do(PlayerPacket &packet, std::shared_ptr player) override + void Do(PlayerPacket &packet, const std::shared_ptr &player) override { DEBUG_PRINTF(strPacketID.c_str()); diff --git a/apps/openmw-mp/processors/player/ProcessorPlayerAnimPlay.hpp b/apps/openmw-mp/processors/player/ProcessorPlayerAnimPlay.hpp index dc0fc646f..c034017d7 100644 --- a/apps/openmw-mp/processors/player/ProcessorPlayerAnimPlay.hpp +++ b/apps/openmw-mp/processors/player/ProcessorPlayerAnimPlay.hpp @@ -13,7 +13,7 @@ namespace mwmp BPP_INIT(ID_PLAYER_ANIM_PLAY) } - void Do(PlayerPacket &packet, std::shared_ptr player) override + void Do(PlayerPacket &packet, const std::shared_ptr &player) override { DEBUG_PRINTF(strPacketID.c_str()); diff --git a/apps/openmw-mp/processors/player/ProcessorPlayerAttack.hpp b/apps/openmw-mp/processors/player/ProcessorPlayerAttack.hpp index 636803786..378564261 100644 --- a/apps/openmw-mp/processors/player/ProcessorPlayerAttack.hpp +++ b/apps/openmw-mp/processors/player/ProcessorPlayerAttack.hpp @@ -19,7 +19,7 @@ namespace mwmp playerController = Networking::get().getPlayerPacketController(); } - void Do(PlayerPacket &packet, std::shared_ptr player) override + void Do(PlayerPacket &packet, const std::shared_ptr &player) override { DEBUG_PRINTF(strPacketID.c_str()); diff --git a/apps/openmw-mp/processors/player/ProcessorPlayerAttribute.hpp b/apps/openmw-mp/processors/player/ProcessorPlayerAttribute.hpp index 7a93a5bd3..6b4120c10 100644 --- a/apps/openmw-mp/processors/player/ProcessorPlayerAttribute.hpp +++ b/apps/openmw-mp/processors/player/ProcessorPlayerAttribute.hpp @@ -17,7 +17,7 @@ namespace mwmp BPP_INIT(ID_PLAYER_ATTRIBUTE) } - void Do(PlayerPacket &packet, std::shared_ptr player) override + void Do(PlayerPacket &packet, const std::shared_ptr &player) override { if (!player->creatureStats.mDead) { diff --git a/apps/openmw-mp/processors/player/ProcessorPlayerBook.hpp b/apps/openmw-mp/processors/player/ProcessorPlayerBook.hpp index 58a8f6bc3..38abe582b 100644 --- a/apps/openmw-mp/processors/player/ProcessorPlayerBook.hpp +++ b/apps/openmw-mp/processors/player/ProcessorPlayerBook.hpp @@ -13,7 +13,7 @@ namespace mwmp BPP_INIT(ID_PLAYER_BOOK) } - void Do(PlayerPacket &packet, std::shared_ptr player) override + void Do(PlayerPacket &packet, const std::shared_ptr &player) override { DEBUG_PRINTF(strPacketID.c_str()); diff --git a/apps/openmw-mp/processors/player/ProcessorPlayerBounty.hpp b/apps/openmw-mp/processors/player/ProcessorPlayerBounty.hpp index 4f3edf90d..c3b7d5ffa 100644 --- a/apps/openmw-mp/processors/player/ProcessorPlayerBounty.hpp +++ b/apps/openmw-mp/processors/player/ProcessorPlayerBounty.hpp @@ -13,7 +13,7 @@ namespace mwmp BPP_INIT(ID_PLAYER_BOUNTY) } - void Do(PlayerPacket &packet, std::shared_ptr player) override + void Do(PlayerPacket &packet, const std::shared_ptr &player) override { Networking::get().getState().getEventCtrl().Call(player); } diff --git a/apps/openmw-mp/processors/player/ProcessorPlayerCellChange.hpp b/apps/openmw-mp/processors/player/ProcessorPlayerCellChange.hpp index c7f094957..fb74c3eb3 100644 --- a/apps/openmw-mp/processors/player/ProcessorPlayerCellChange.hpp +++ b/apps/openmw-mp/processors/player/ProcessorPlayerCellChange.hpp @@ -21,7 +21,7 @@ namespace mwmp playerController = Networking::get().getPlayerPacketController(); } - void Do(PlayerPacket &packet, std::shared_ptr player) override + void Do(PlayerPacket &packet, const std::shared_ptr &player) 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/player/ProcessorPlayerCellState.hpp b/apps/openmw-mp/processors/player/ProcessorPlayerCellState.hpp index eb1af8115..84e7c31e9 100644 --- a/apps/openmw-mp/processors/player/ProcessorPlayerCellState.hpp +++ b/apps/openmw-mp/processors/player/ProcessorPlayerCellState.hpp @@ -17,7 +17,7 @@ namespace mwmp playerController = Networking::get().getPlayerPacketController(); } - void Do(PlayerPacket &packet, std::shared_ptr player) override + void Do(PlayerPacket &packet, const std::shared_ptr &player) 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/player/ProcessorPlayerCharClass.hpp b/apps/openmw-mp/processors/player/ProcessorPlayerCharClass.hpp index 831e281ab..6148fa946 100644 --- a/apps/openmw-mp/processors/player/ProcessorPlayerCharClass.hpp +++ b/apps/openmw-mp/processors/player/ProcessorPlayerCharClass.hpp @@ -17,7 +17,7 @@ namespace mwmp BPP_INIT(ID_PLAYER_CHARCLASS) } - void Do(PlayerPacket &packet, std::shared_ptr player) override + void Do(PlayerPacket &packet, const std::shared_ptr &player) override { DEBUG_PRINTF(strPacketID.c_str()); } diff --git a/apps/openmw-mp/processors/player/ProcessorPlayerCharGen.hpp b/apps/openmw-mp/processors/player/ProcessorPlayerCharGen.hpp index cd265cb54..edc9cd46b 100644 --- a/apps/openmw-mp/processors/player/ProcessorPlayerCharGen.hpp +++ b/apps/openmw-mp/processors/player/ProcessorPlayerCharGen.hpp @@ -17,7 +17,7 @@ namespace mwmp BPP_INIT(ID_PLAYER_CHARGEN) } - void Do(PlayerPacket &packet, std::shared_ptr player) override + void Do(PlayerPacket &packet, const std::shared_ptr &player) override { DEBUG_PRINTF(strPacketID.c_str()); diff --git a/apps/openmw-mp/processors/player/ProcessorPlayerDeath.hpp b/apps/openmw-mp/processors/player/ProcessorPlayerDeath.hpp index eb06114b2..62e70a9e2 100644 --- a/apps/openmw-mp/processors/player/ProcessorPlayerDeath.hpp +++ b/apps/openmw-mp/processors/player/ProcessorPlayerDeath.hpp @@ -18,7 +18,7 @@ namespace mwmp BPP_INIT(ID_PLAYER_DEATH) } - void Do(PlayerPacket &packet, std::shared_ptr player) override + void Do(PlayerPacket &packet, const std::shared_ptr &player) 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/player/ProcessorPlayerDisposition.hpp b/apps/openmw-mp/processors/player/ProcessorPlayerDisposition.hpp index 6666206b4..ea0e3a197 100644 --- a/apps/openmw-mp/processors/player/ProcessorPlayerDisposition.hpp +++ b/apps/openmw-mp/processors/player/ProcessorPlayerDisposition.hpp @@ -13,7 +13,7 @@ namespace mwmp BPP_INIT(ID_PLAYER_DISPOSITION) } - void Do(PlayerPacket &packet, std::shared_ptr player) override + void Do(PlayerPacket &packet, const std::shared_ptr &player) override { DEBUG_PRINTF(strPacketID.c_str()); diff --git a/apps/openmw-mp/processors/player/ProcessorPlayerEquipment.hpp b/apps/openmw-mp/processors/player/ProcessorPlayerEquipment.hpp index 1261ade68..828a1775d 100644 --- a/apps/openmw-mp/processors/player/ProcessorPlayerEquipment.hpp +++ b/apps/openmw-mp/processors/player/ProcessorPlayerEquipment.hpp @@ -17,7 +17,7 @@ namespace mwmp BPP_INIT(ID_PLAYER_EQUIPMENT) } - void Do(PlayerPacket &packet, std::shared_ptr player) override + void Do(PlayerPacket &packet, const std::shared_ptr &player) override { DEBUG_PRINTF(strPacketID.c_str()); diff --git a/apps/openmw-mp/processors/player/ProcessorPlayerFaction.hpp b/apps/openmw-mp/processors/player/ProcessorPlayerFaction.hpp index d0153497a..0a20f18d0 100644 --- a/apps/openmw-mp/processors/player/ProcessorPlayerFaction.hpp +++ b/apps/openmw-mp/processors/player/ProcessorPlayerFaction.hpp @@ -13,7 +13,7 @@ namespace mwmp BPP_INIT(ID_PLAYER_FACTION) } - void Do(PlayerPacket &packet, std::shared_ptr player) override + void Do(PlayerPacket &packet, const std::shared_ptr &player) override { DEBUG_PRINTF(strPacketID.c_str()); diff --git a/apps/openmw-mp/processors/player/ProcessorPlayerInventory.hpp b/apps/openmw-mp/processors/player/ProcessorPlayerInventory.hpp index cd120e11c..6b39f8095 100644 --- a/apps/openmw-mp/processors/player/ProcessorPlayerInventory.hpp +++ b/apps/openmw-mp/processors/player/ProcessorPlayerInventory.hpp @@ -17,7 +17,7 @@ namespace mwmp BPP_INIT(ID_PLAYER_INVENTORY) } - void Do(PlayerPacket &packet, std::shared_ptr player) override + void Do(PlayerPacket &packet, const std::shared_ptr &player) override { DEBUG_PRINTF(strPacketID.c_str()); diff --git a/apps/openmw-mp/processors/player/ProcessorPlayerJournal.hpp b/apps/openmw-mp/processors/player/ProcessorPlayerJournal.hpp index 82ccbb1cb..6c0fbc38d 100644 --- a/apps/openmw-mp/processors/player/ProcessorPlayerJournal.hpp +++ b/apps/openmw-mp/processors/player/ProcessorPlayerJournal.hpp @@ -13,7 +13,7 @@ namespace mwmp BPP_INIT(ID_PLAYER_JOURNAL) } - void Do(PlayerPacket &packet, std::shared_ptr player) override + void Do(PlayerPacket &packet, const std::shared_ptr &player) override { DEBUG_PRINTF(strPacketID.c_str()); diff --git a/apps/openmw-mp/processors/player/ProcessorPlayerKillCount.hpp b/apps/openmw-mp/processors/player/ProcessorPlayerKillCount.hpp index 8f05a3d4c..582d7c680 100644 --- a/apps/openmw-mp/processors/player/ProcessorPlayerKillCount.hpp +++ b/apps/openmw-mp/processors/player/ProcessorPlayerKillCount.hpp @@ -13,7 +13,7 @@ namespace mwmp BPP_INIT(ID_PLAYER_KILL_COUNT) } - void Do(PlayerPacket &packet, std::shared_ptr player) override + void Do(PlayerPacket &packet, const std::shared_ptr &player) override { DEBUG_PRINTF(strPacketID.c_str()); diff --git a/apps/openmw-mp/processors/player/ProcessorPlayerLevel.hpp b/apps/openmw-mp/processors/player/ProcessorPlayerLevel.hpp index 3a4491d0f..9f8863bb9 100644 --- a/apps/openmw-mp/processors/player/ProcessorPlayerLevel.hpp +++ b/apps/openmw-mp/processors/player/ProcessorPlayerLevel.hpp @@ -13,7 +13,7 @@ namespace mwmp BPP_INIT(ID_PLAYER_LEVEL) } - void Do(PlayerPacket &packet, std::shared_ptr player) override + void Do(PlayerPacket &packet, const std::shared_ptr &player) override { if (!player->creatureStats.mDead) Networking::get().getState().getEventCtrl().Call(player); diff --git a/apps/openmw-mp/processors/player/ProcessorPlayerMap.hpp b/apps/openmw-mp/processors/player/ProcessorPlayerMap.hpp index ac6fc8bbe..f7e1a93c5 100644 --- a/apps/openmw-mp/processors/player/ProcessorPlayerMap.hpp +++ b/apps/openmw-mp/processors/player/ProcessorPlayerMap.hpp @@ -13,7 +13,7 @@ namespace mwmp BPP_INIT(ID_PLAYER_MAP) } - void Do(PlayerPacket &packet, std::shared_ptr player) override + void Do(PlayerPacket &packet, const std::shared_ptr &player) override { DEBUG_PRINTF(strPacketID.c_str()); diff --git a/apps/openmw-mp/processors/player/ProcessorPlayerPosition.hpp b/apps/openmw-mp/processors/player/ProcessorPlayerPosition.hpp index 3782ea9d3..7b0c0c11d 100644 --- a/apps/openmw-mp/processors/player/ProcessorPlayerPosition.hpp +++ b/apps/openmw-mp/processors/player/ProcessorPlayerPosition.hpp @@ -17,7 +17,7 @@ namespace mwmp BPP_INIT(ID_PLAYER_POSITION) } - void Do(PlayerPacket &packet, std::shared_ptr player) override + void Do(PlayerPacket &packet, const std::shared_ptr &player) override { //DEBUG_PRINTF(strPacketID); if (!player->creatureStats.mDead) diff --git a/apps/openmw-mp/processors/player/ProcessorPlayerRest.hpp b/apps/openmw-mp/processors/player/ProcessorPlayerRest.hpp index 4f85c215e..c967b9c7d 100644 --- a/apps/openmw-mp/processors/player/ProcessorPlayerRest.hpp +++ b/apps/openmw-mp/processors/player/ProcessorPlayerRest.hpp @@ -13,7 +13,7 @@ namespace mwmp BPP_INIT(ID_PLAYER_REST) } - void Do(PlayerPacket &packet, std::shared_ptr player) override + void Do(PlayerPacket &packet, const std::shared_ptr &player) override { DEBUG_PRINTF(strPacketID.c_str()); diff --git a/apps/openmw-mp/processors/player/ProcessorPlayerResurrect.hpp b/apps/openmw-mp/processors/player/ProcessorPlayerResurrect.hpp index 06081af7e..fc771f610 100644 --- a/apps/openmw-mp/processors/player/ProcessorPlayerResurrect.hpp +++ b/apps/openmw-mp/processors/player/ProcessorPlayerResurrect.hpp @@ -17,7 +17,7 @@ namespace mwmp BPP_INIT(ID_PLAYER_RESURRECT) } - void Do(PlayerPacket &packet, std::shared_ptr player) override + void Do(PlayerPacket &packet, const std::shared_ptr &player) override { LOG_MESSAGE_SIMPLE(Log::LOG_VERBOSE, "Received %s from %s", strPacketID.c_str(), player->npc.mName.c_str()); diff --git a/apps/openmw-mp/processors/player/ProcessorPlayerShapeshift.hpp b/apps/openmw-mp/processors/player/ProcessorPlayerShapeshift.hpp index 48478fdf4..5f08fc70d 100644 --- a/apps/openmw-mp/processors/player/ProcessorPlayerShapeshift.hpp +++ b/apps/openmw-mp/processors/player/ProcessorPlayerShapeshift.hpp @@ -13,7 +13,7 @@ namespace mwmp BPP_INIT(ID_PLAYER_SHAPESHIFT) } - void Do(PlayerPacket &packet, std::shared_ptr player) override + void Do(PlayerPacket &packet, const std::shared_ptr &player) 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/player/ProcessorPlayerSkill.hpp b/apps/openmw-mp/processors/player/ProcessorPlayerSkill.hpp index 5454c8d70..55e14ad2e 100644 --- a/apps/openmw-mp/processors/player/ProcessorPlayerSkill.hpp +++ b/apps/openmw-mp/processors/player/ProcessorPlayerSkill.hpp @@ -17,7 +17,7 @@ namespace mwmp BPP_INIT(ID_PLAYER_SKILL) } - void Do(PlayerPacket &packet, std::shared_ptr player) override + void Do(PlayerPacket &packet, const std::shared_ptr &player) override { if (!player->creatureStats.mDead) { diff --git a/apps/openmw-mp/processors/player/ProcessorPlayerSpeech.hpp b/apps/openmw-mp/processors/player/ProcessorPlayerSpeech.hpp index ceae245ce..d268abd36 100644 --- a/apps/openmw-mp/processors/player/ProcessorPlayerSpeech.hpp +++ b/apps/openmw-mp/processors/player/ProcessorPlayerSpeech.hpp @@ -13,7 +13,7 @@ namespace mwmp BPP_INIT(ID_PLAYER_SPEECH) } - void Do(PlayerPacket &packet, std::shared_ptr player) override + void Do(PlayerPacket &packet, const std::shared_ptr &player) override { DEBUG_PRINTF(strPacketID.c_str()); diff --git a/apps/openmw-mp/processors/player/ProcessorPlayerSpellbook.hpp b/apps/openmw-mp/processors/player/ProcessorPlayerSpellbook.hpp index 328b18c70..cfdb03088 100644 --- a/apps/openmw-mp/processors/player/ProcessorPlayerSpellbook.hpp +++ b/apps/openmw-mp/processors/player/ProcessorPlayerSpellbook.hpp @@ -17,7 +17,7 @@ namespace mwmp BPP_INIT(ID_PLAYER_SPELLBOOK) } - void Do(PlayerPacket &packet, std::shared_ptr player) override + void Do(PlayerPacket &packet, const std::shared_ptr &player) override { DEBUG_PRINTF(strPacketID.c_str()); diff --git a/apps/openmw-mp/processors/player/ProcessorPlayerStatsDynamic.hpp b/apps/openmw-mp/processors/player/ProcessorPlayerStatsDynamic.hpp index 0241926a6..23a630164 100644 --- a/apps/openmw-mp/processors/player/ProcessorPlayerStatsDynamic.hpp +++ b/apps/openmw-mp/processors/player/ProcessorPlayerStatsDynamic.hpp @@ -17,7 +17,7 @@ namespace mwmp BPP_INIT(ID_PLAYER_STATS_DYNAMIC) } - void Do(PlayerPacket &packet, std::shared_ptr player) override + void Do(PlayerPacket &packet, const std::shared_ptr &player) override { DEBUG_PRINTF(strPacketID.c_str()); diff --git a/apps/openmw-mp/processors/player/ProcessorPlayerTopic.hpp b/apps/openmw-mp/processors/player/ProcessorPlayerTopic.hpp index 894a7fed7..fdcdfae0d 100644 --- a/apps/openmw-mp/processors/player/ProcessorPlayerTopic.hpp +++ b/apps/openmw-mp/processors/player/ProcessorPlayerTopic.hpp @@ -13,7 +13,7 @@ namespace mwmp BPP_INIT(ID_PLAYER_TOPIC) } - void Do(PlayerPacket &packet, std::shared_ptr player) override + void Do(PlayerPacket &packet, const std::shared_ptr &player) override { DEBUG_PRINTF(strPacketID.c_str()); diff --git a/apps/openmw-mp/processors/world/ProcessorContainer.hpp b/apps/openmw-mp/processors/world/ProcessorContainer.hpp index 819491083..667e488e4 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, std::shared_ptr player, BaseEvent &event) override + void Do(WorldPacket &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", event.action); diff --git a/apps/openmw-mp/processors/world/ProcessorDoorState.hpp b/apps/openmw-mp/processors/world/ProcessorDoorState.hpp index 2cd205c9d..1e70f6313 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, std::shared_ptr player, BaseEvent &event) override + void Do(WorldPacket &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 b7c9224ba..335ce6485 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, std::shared_ptr player, BaseEvent &event) override + void Do(WorldPacket &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 a5ed3db6d..6391f33c5 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, std::shared_ptr player, BaseEvent &event) override + void Do(WorldPacket &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 c70e9d110..46d0fa6e3 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, std::shared_ptr player, BaseEvent &event) override + void Do(WorldPacket &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 63d3148e2..617598fb3 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, std::shared_ptr player, BaseEvent &event) override + void Do(WorldPacket &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 65647a873..823d64967 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, std::shared_ptr player, BaseEvent &event) override + void Do(WorldPacket &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 6ef369867..1635df8c1 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, std::shared_ptr player, BaseEvent &event) override + void Do(WorldPacket &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 fe410db9b..6d3a56dea 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, std::shared_ptr player, BaseEvent &event) override + void Do(WorldPacket &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());