From 32b38fb2649fb282b6446c4e544866c0161aa7da Mon Sep 17 00:00:00 2001 From: mohe2015 Date: Sun, 6 Nov 2016 19:30:19 +0100 Subject: Anticheat fastbreak (#3411) Added block hardness checks when breaking blocks. --- src/ClientHandle.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/ClientHandle.h') diff --git a/src/ClientHandle.h b/src/ClientHandle.h index cadce3c09..77c94db09 100644 --- a/src/ClientHandle.h +++ b/src/ClientHandle.h @@ -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); -- cgit v1.2.3