From ad3a77fbe81d967caf6ebbade45c33d563fe7349 Mon Sep 17 00:00:00 2001 From: "Marius \"Teelevision\" Neugebauer" Date: Sat, 5 Apr 2014 04:41:18 +0200 Subject: some tidy up on the bot detection --- src/game/server/entities/character.h | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'src/game/server/entities/character.h') diff --git a/src/game/server/entities/character.h b/src/game/server/entities/character.h index 77997903..0d68707a 100644 --- a/src/game/server/entities/character.h +++ b/src/game/server/entities/character.h @@ -70,13 +70,9 @@ public: int m_FreezeTicks; // bot detection - struct LastPosition { - float x; - float y; - }; - bool HasBeenThereRecently(float x, float y, const LastPosition *&pos, int firstTick, int lastTick) const; - bool AimedAtCharRecently(float aimX, float aimY, const CCharacter *c, const LastPosition *&pos, const LastPosition *&posVictim, int firstTick); - float HowCloseToXRecently(vec2 x, const LastPosition *&pos, int firstTick); + bool HasBeenThereRecently(vec2 v, const vec2 *&pos, int firstTick, int lastTick) const; + bool AimedAtCharRecently(vec2 v, const CCharacter *c, const vec2 *&pos, const vec2 *&posVictim, int firstTick); + float HowCloseToXRecently(vec2 x, const vec2 *&pos, int firstTick); private: // player controlling this character @@ -146,7 +142,7 @@ private: CCharacterCore m_ReckoningCore; // the dead reckoning core // bot detection - LastPosition *m_LastPositions; + vec2 *m_LastPositions; int m_LastPositionsSize; }; -- cgit 1.4.1