From: sfan5 Date: Thu, 29 Dec 2016 18:35:22 +0000 (+0100) Subject: Fix interact range check (thanks to @lhofhansl) X-Git-Tag: 0.4.16~565 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=dd3cda6bedf0ed7443258f33d5a5cf68fa120534;p=oweals%2Fminetest.git Fix interact range check (thanks to @lhofhansl) --- diff --git a/src/network/serverpackethandler.cpp b/src/network/serverpackethandler.cpp index f99e104ec..d0f4d948d 100644 --- a/src/network/serverpackethandler.cpp +++ b/src/network/serverpackethandler.cpp @@ -1440,7 +1440,8 @@ void Server::handleCommand_Interact(NetworkPacket* pkt) max_d = max_d_hand; else if (max_d < 0) max_d = BS * 4.0; - if (d > max_d * 1.5) { + // cube diagonal: sqrt(3) = 1.73 + if (d > max_d * 1.73) { actionstream << "Player " << player->getName() << " tried to access " << pointed.dump() << " from too far: "