Skip to content

Commit

Permalink
CheatDetection: Move player access (#1209)
Browse files Browse the repository at this point in the history
  • Loading branch information
EmosewaMC authored Oct 5, 2023
1 parent a8820c1 commit 258ee5c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dGame/dUtilities/CheatDetection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down

0 comments on commit 258ee5c

Please sign in to comment.