aboutsummaryrefslogtreecommitdiff
path: root/src/network/serverpackethandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/serverpackethandler.cpp')
-rw-r--r--src/network/serverpackethandler.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/network/serverpackethandler.cpp b/src/network/serverpackethandler.cpp
index f33b1a523..6c766a37a 100644
--- a/src/network/serverpackethandler.cpp
+++ b/src/network/serverpackethandler.cpp
@@ -1380,7 +1380,9 @@ void Server::handleCommand_Interact(NetworkPacket* pkt)
Check that target is reasonably close
(only when digging or placing things)
*/
- static const bool enable_anticheat = !g_settings->getBool("disable_anticheat");
+ static thread_local const bool enable_anticheat =
+ !g_settings->getBool("disable_anticheat");
+
if ((action == 0 || action == 2 || action == 3 || action == 4) &&
(enable_anticheat && !isSingleplayer())) {
float d = player_pos.getDistanceFrom(pointed_pos_under);