From 0e8a4742ebee9af2454525e43bbb33a40c7a9aaa Mon Sep 17 00:00:00 2001 From: gsemaj Date: Sat, 16 Jul 2022 12:18:32 -0700 Subject: [PATCH] Get rid of player fire rate suspicion This was super primitive & jank, and caused false positives. Will replace with a polished system later on. --- src/Combat.cpp | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/Combat.cpp b/src/Combat.cpp index 16ce751..f7aba6d 100644 --- a/src/Combat.cpp +++ b/src/Combat.cpp @@ -590,21 +590,6 @@ static void projectileHit(CNSocket* sock, CNPacketData* data) { return; } - // rapid fire anti-cheat - time_t currTime = getTime(); - if (currTime - plr->lastShot < plr->fireRate * 80) - plr->suspicionRating += plr->fireRate * 100 + plr->lastShot - currTime; // gain suspicion for rapid firing - else if (currTime - plr->lastShot < plr->fireRate * 180 && plr->suspicionRating > 0) - plr->suspicionRating += plr->fireRate * 100 + plr->lastShot - currTime; // lose suspicion for delayed firing - - plr->lastShot = currTime; - - if (plr->suspicionRating > 10000) { // kill the socket when the player is too suspicious - sock->kill(); - CNShardServer::_killConnection(sock); - return; - } - /* * initialize response struct * rocket style hit doesn't work properly, so we're always sending this one