From 258ee5c1eebeaf0aefadad94c55c8c5e78b649b0 Mon Sep 17 00:00:00 2001 From: David Markowitz <39972741+EmosewaMC@users.noreply.github.com> Date: Thu, 5 Oct 2023 15:31:05 -0700 Subject: [PATCH] CheatDetection: Move player access (#1209) --- dGame/dUtilities/CheatDetection.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dGame/dUtilities/CheatDetection.cpp b/dGame/dUtilities/CheatDetection.cpp index 6459bb2c0..11a682633 100644 --- a/dGame/dUtilities/CheatDetection.cpp +++ b/dGame/dUtilities/CheatDetection.cpp @@ -55,17 +55,18 @@ void LogAndSaveFailedAntiCheatCheck(const LWOOBJID& id, const SystemAddress& sys player->GetCharacter()->GetName().c_str(), player->GetObjectID(), sysAddr.ToString(), entity->GetCharacter()->GetName().c_str(), entity->GetObjectID()); + toReport = player->GetParentUser(); // In the case that the target entity id did not exist, just log the player info. } else if (player) { Game::logger->Log("CheatDetection", "Player (%s) (%llu) at system address (%s) with sending player (%llu) does not match their own.", player->GetCharacter()->GetName().c_str(), player->GetObjectID(), sysAddr.ToString(), id); + toReport = player->GetParentUser(); // In the rare case that the player does not exist, just log the system address and who the target id was. } else { Game::logger->Log("CheatDetection", "Player at system address (%s) with sending player (%llu) does not match their own.", sysAddr.ToString(), id); } - toReport = player->GetParentUser(); break; } case CheckType::User: {