Fix instant mining of blocks not being recognised, tweak anti-cheat (#4938)

* Tried to fix a small issue...

Ended up rewriting a bunch of god awful, opaque code with no source
and no sense. Who names a function GetPlayerRelativeBlockHardness???
It's gone now. We're safe again.

* Testing anti-cheat.

* Tidy up debug logging.

* Remove empty member declaration.

* Rewrite GetDigSpeed slightly for better readability.

* GetMiningProgressPerTick now returns 1 when instantly mined. Fixed hasily written typo.

* Comment style and typo fixes.
This commit is contained in:
KingCol13
2020-10-02 20:57:17 +00:00
committed by GitHub
parent 89fb16fc27
commit cd1b507745
6 changed files with 109 additions and 49 deletions
+2
View File
@@ -562,6 +562,8 @@ private:
/** Shared pointer to self, so that this instance can keep itself alive when needed. */
cClientHandlePtr m_Self;
/** The fraction between 0 and 1, of how far through mining the currently mined block is.
0 for just started, 1 for broken. Used for anti-cheat. */
float m_BreakProgress;
/** Finish logging the user in after authenticating. */