1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-12 16:58:39 +00: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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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) {