Anticheat fastbreak (#3411)

Added block hardness checks when breaking blocks.
This commit is contained in:
mohe2015
2016-11-06 19:30:19 +01:00
committed by Mattes D
parent 733401ec5f
commit 32b38fb264
20 changed files with 2701 additions and 3 deletions
+6
View File
@@ -63,6 +63,11 @@ public: // tolua_export
static const int MAX_VIEW_DISTANCE = 32;
static const int MIN_VIEW_DISTANCE = 1;
/** The percentage how much a block has to be broken.
Should be a value between 0.7 (70% broken) and 1 (100% broken) depending on lag.
Can be set in settings.ini [AntiCheat] FastBreakPercentage=(from 0 to 100) */
static float FASTBREAK_PERCENTAGE;
/** Creates a new client with the specified IP address in its description and the specified initial view distance. */
cClientHandle(const AString & a_IPString, int a_ViewDistance);
@@ -519,6 +524,7 @@ private:
/** Shared pointer to self, so that this instance can keep itself alive when needed. */
cClientHandlePtr m_Self;
float m_BreakProgress;
/** Returns true if the rate block interactions is within a reasonable limit (bot protection) */
bool CheckBlockInteractionsRate(void);