Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
revert(gamestate/server): revert warning message additions & check
reverted the check to the previous state (checking if the mode is Default) and removed the netId from the message.
  • Loading branch information
0xLuca committed Jul 28, 2022
1 parent 7f146ba commit 2e1ea19
Showing 1 changed file with 2 additions and 3 deletions.
Expand Up @@ -5803,17 +5803,16 @@ std::function<bool()> fx::ServerGameState::GetRequestControlEventHandler(const f
{
static std::chrono::milliseconds lastWarn{ -120 * 1000 };

if (g_requestControlFilterState != RequestControlFilterMode::NoFilter)
if (g_requestControlFilterState == RequestControlFilterMode::Default)
{
auto now = msec();

if ((now - lastWarn) > std::chrono::seconds{ 120 })
{
console::PrintWarning("sync", "A client (slotID %d, netID %d) tried to use NetworkRequestControlOfEntity (entity network ID %d), but it was rejected (%s).\n"
console::PrintWarning("sync", "A client (slotID %d) tried to use NetworkRequestControlOfEntity (entity network ID %d), but it was rejected (%s).\n"
"NetworkRequestControlOfEntity is deprecated, and should not be used because of potential abuse by cheaters. To disable this check, set \"sv_filterRequestControl\" \"0\".\n"
"See https://aka.cfx.re/rcmitigation for more information.\n",
client->GetSlotId(),
client->GetNetId(),
objectId,
reason);

Expand Down

0 comments on commit 2e1ea19

Please sign in to comment.