]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/network/serverpackethandler.cpp
Use thread_local instead from some static settings (#5955)
[dragonfireclient.git] / src / network / serverpackethandler.cpp
index f33b1a523cb4590f46463ad8d2acab6b4b1a6696..6c766a37a57b81fce6141c30cd5f5781b2f98ca8 100644 (file)
@@ -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);