forked from Mirrorlandia_minetest/minetest
Fix object interaction distance not being checked (#10547)
This commit is contained in:
parent
c940a57a38
commit
7589cbe086
@ -1050,12 +1050,13 @@ void Server::handleCommand_Interact(NetworkPacket *pkt)
|
|||||||
}
|
}
|
||||||
float d = playersao->getEyePosition().getDistanceFrom(target_pos);
|
float d = playersao->getEyePosition().getDistanceFrom(target_pos);
|
||||||
|
|
||||||
if (!checkInteractDistance(player, d, pointed.dump())
|
if (!checkInteractDistance(player, d, pointed.dump())) {
|
||||||
&& pointed.type == POINTEDTHING_NODE) {
|
if (pointed.type == POINTEDTHING_NODE) {
|
||||||
// Re-send block to revert change on client-side
|
// Re-send block to revert change on client-side
|
||||||
RemoteClient *client = getClient(peer_id);
|
RemoteClient *client = getClient(peer_id);
|
||||||
v3s16 blockpos = getNodeBlockPos(pointed.node_undersurface);
|
v3s16 blockpos = getNodeBlockPos(pointed.node_undersurface);
|
||||||
client->SetBlockNotSent(blockpos);
|
client->SetBlockNotSent(blockpos);
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user