1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Item meta pointing range (#14347)

This commit is contained in:
cx384 2024-03-17 15:55:38 +01:00 committed by GitHub
parent e3b9828f24
commit 234b01a8c2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 38 additions and 10 deletions

View file

@ -895,8 +895,7 @@ bool Server::checkInteractDistance(RemotePlayer *player, const f32 d, const std:
{
ItemStack selected_item, hand_item;
player->getWieldedItem(&selected_item, &hand_item);
f32 max_d = BS * getToolRange(selected_item.getDefinition(m_itemdef),
hand_item.getDefinition(m_itemdef));
f32 max_d = BS * getToolRange(selected_item, hand_item, m_itemdef);
// Cube diagonal * 1.5 for maximal supported node extents:
// sqrt(3) * 1.5 ≅ 2.6