1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-13 08:35:20 +02:00

Object selection: Improve distance checks (#12974)

This commit is contained in:
DS
2022-11-20 21:27:47 +01:00
committed by GitHub
parent 475005012a
commit 5f24a3c0c7
3 changed files with 49 additions and 2 deletions

View File

@@ -495,8 +495,7 @@ void ClientEnvironment::getSelectedActiveObjects(
std::vector<PointedThing> &objects)
{
std::vector<DistanceSortedActiveObject> allObjects;
getActiveObjects(shootline_on_map.start,
shootline_on_map.getLength() + 10.0f, allObjects);
m_ao_manager.getActiveSelectableObjects(shootline_on_map, allObjects);
const v3f line_vector = shootline_on_map.getVector();
for (const auto &allObject : allObjects) {