diff --git a/src/Combat.cpp b/src/Combat.cpp index 186aea8..ea79f0a 100644 --- a/src/Combat.cpp +++ b/src/Combat.cpp @@ -74,8 +74,12 @@ static void pcAttackNpcs(CNSocket *sock, CNPacketData *data) { if (pkt->iNPCCnt > 3) // 3+ targets should never be possible plr->suspicionRating += 10000; - if (plr->suspicionRating > 10000) // kill the socket when the player is too suspicious + if (plr->suspicionRating > 10000) { // kill the socket when the player is too suspicious sock->kill(); + CNShardServer::_killConnection(sock); + return; + } + /* * IMPORTANT: This validates memory safety in addition to preventing @@ -625,8 +629,11 @@ static void projectileHit(CNSocket* sock, CNPacketData* data) { plr->lastShot = currTime; - if (plr->suspicionRating > 10000) // kill the socket when the player is too suspicious + if (plr->suspicionRating > 10000) { // kill the socket when the player is too suspicious sock->kill(); + CNShardServer::_killConnection(sock); + return; + } /* * initialize response struct