about summary refs log tree commit diff
path: root/src/game/server/entities/character.h
diff options
context:
space:
mode:
authorMarius "Teelevision" Neugebauer <marius@teele.eu>2014-04-05 04:41:18 +0200
committerMarius "Teelevision" Neugebauer <marius@teele.eu>2014-04-05 04:41:18 +0200
commitad3a77fbe81d967caf6ebbade45c33d563fe7349 (patch)
treea0bf06a42851371f41296e994940c26b5a34c452 /src/game/server/entities/character.h
parentfe99af570a17d5b94e82a4b7fa5aa27e8b9a8eaf (diff)
downloadzcatch-ad3a77fbe81d967caf6ebbade45c33d563fe7349.tar.gz
zcatch-ad3a77fbe81d967caf6ebbade45c33d563fe7349.zip
some tidy up on the bot detection
Diffstat (limited to 'src/game/server/entities/character.h')
-rw-r--r--src/game/server/entities/character.h12
1 files changed, 4 insertions, 8 deletions
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;
 
 };