diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/network/serverpackethandler.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/network/serverpackethandler.cpp b/src/network/serverpackethandler.cpp index 0bd09e637..95e7c548e 100644 --- a/src/network/serverpackethandler.cpp +++ b/src/network/serverpackethandler.cpp @@ -1050,12 +1050,13 @@ void Server::handleCommand_Interact(NetworkPacket *pkt) } float d = playersao->getEyePosition().getDistanceFrom(target_pos); - if (!checkInteractDistance(player, d, pointed.dump()) - && pointed.type == POINTEDTHING_NODE) { - // Re-send block to revert change on client-side - RemoteClient *client = getClient(peer_id); - v3s16 blockpos = getNodeBlockPos(pointed.node_undersurface); - client->SetBlockNotSent(blockpos); + if (!checkInteractDistance(player, d, pointed.dump())) { + if (pointed.type == POINTEDTHING_NODE) { + // Re-send block to revert change on client-side + RemoteClient *client = getClient(peer_id); + v3s16 blockpos = getNodeBlockPos(pointed.node_undersurface); + client->SetBlockNotSent(blockpos); + } return; } } |