From 64b57983f0b85d7d4e9229a9e6d021218604087e Mon Sep 17 00:00:00 2001 From: David Cernat Date: Fri, 24 Nov 2017 09:43:07 +0200 Subject: [PATCH] [General] Add TRACE log messages in player processors --- apps/openmw-mp/processors/PlayerProcessor.cpp | 2 ++ apps/openmw/mwmp/processors/PlayerProcessor.cpp | 3 +++ 2 files changed, 5 insertions(+) diff --git a/apps/openmw-mp/processors/PlayerProcessor.cpp b/apps/openmw-mp/processors/PlayerProcessor.cpp index 9e9f99219..e6753f073 100644 --- a/apps/openmw-mp/processors/PlayerProcessor.cpp +++ b/apps/openmw-mp/processors/PlayerProcessor.cpp @@ -20,6 +20,8 @@ bool PlayerProcessor::Process(RakNet::Packet &packet) noexcept PlayerPacket *myPacket = Networking::get().getPlayerPacketController()->GetPacket(packet.data[0]); myPacket->setPlayer(player.get()); + LOG_MESSAGE_SIMPLE(Log::LOG_TRACE, "Processing %s from %s", processor.second->strPacketID.c_str(), player->npc.mName.c_str()); + if (!processor.second->avoidReading) myPacket->Read(); diff --git a/apps/openmw/mwmp/processors/PlayerProcessor.cpp b/apps/openmw/mwmp/processors/PlayerProcessor.cpp index 2ef955871..d68eb09b5 100644 --- a/apps/openmw/mwmp/processors/PlayerProcessor.cpp +++ b/apps/openmw/mwmp/processors/PlayerProcessor.cpp @@ -37,6 +37,9 @@ bool PlayerProcessor::Process(RakNet::Packet &packet) else player = Main::get().getLocalPlayer(); + if (player != 0) + LOG_MESSAGE_SIMPLE(Log::LOG_TRACE, "Processing %s about %s", processor.second->strPacketID.c_str(), player->npc.mName.c_str()); + if (!request && !processor.second->avoidReading && player != 0) { myPacket->setPlayer(player);