From 92195db17d92856206ba4bcadb9426c98a47bccc Mon Sep 17 00:00:00 2001 From: "Marius \"Teelevision\" Neugebauer" Date: Sat, 5 Apr 2014 05:13:20 +0200 Subject: improved bot detection in one case of false positives --- src/game/server/gamecontext.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/game') diff --git a/src/game/server/gamecontext.cpp b/src/game/server/gamecontext.cpp index 4dab670e..29295ef9 100644 --- a/src/game/server/gamecontext.cpp +++ b/src/game/server/gamecontext.cpp @@ -579,6 +579,11 @@ void CGameContext::OnTick() *pos == p->m_AimBotLastDetectionPos && *posVictim == p->m_AimBotLastDetectionPosVictim ) + // don't detect horizontal dragging + && !( + pos->y == p->m_AimBotLastDetectionPos.y + && posVictim->y == p->m_AimBotLastDetectionPosVictim.y + ) )//if { indexAdd = 1; @@ -614,8 +619,8 @@ void CGameContext::OnTick() SendChatTarget(j, aBuf); } - // reduce once every 2 seconds (tolerance) - if(((Server()->Tick() % (Server()->TickSpeed() * 2)) == 0) && p->m_AimBotIndex) + // reduce once every seconds (tolerance) + if(((Server()->Tick() % Server()->TickSpeed()) == 0) && p->m_AimBotIndex) --p->m_AimBotIndex; } } -- cgit 1.4.1