Fix interact range check (thanks to @lhofhansl)

This commit is contained in:
sfan5 2016-12-29 19:35:22 +01:00
parent abd68d3466
commit dd3cda6bed
1 changed files with 2 additions and 1 deletions

View File

@ -1440,7 +1440,8 @@ void Server::handleCommand_Interact(NetworkPacket* pkt)
max_d = max_d_hand; max_d = max_d_hand;
else if (max_d < 0) else if (max_d < 0)
max_d = BS * 4.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() actionstream << "Player " << player->getName()
<< " tried to access " << pointed.dump() << " tried to access " << pointed.dump()
<< " from too far: " << " from too far: "