projects
/
oweals
/
minetest.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
abd68d3
)
Fix interact range check (thanks to @lhofhansl)
author
sfan5
<sfan5@live.de>
Thu, 29 Dec 2016 18:35:22 +0000
(19:35 +0100)
committer
sfan5
<sfan5@live.de>
Thu, 29 Dec 2016 18:35:22 +0000
(19:35 +0100)
src/network/serverpackethandler.cpp
patch
|
blob
|
history
diff --git
a/src/network/serverpackethandler.cpp
b/src/network/serverpackethandler.cpp
index f99e104ec5b7259db1a8f40758d12024ec9b7d81..d0f4d948d8b6ff7e3bd6f36c84f66756cc23c51f 100644
(file)
--- 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: "