1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-11 17:51:04 +00:00

Update client::ActiveObjectMgr::getActiveSelectableObjects API

This commit is contained in:
numzero 2023-06-20 23:06:38 +03:00 committed by sfan5
parent aaae9d5a77
commit d7291e0600
3 changed files with 9 additions and 11 deletions

View file

@ -107,9 +107,9 @@ void ActiveObjectMgr::getActiveObjects(const v3f &origin, f32 max_d,
}
}
void ActiveObjectMgr::getActiveSelectableObjects(const core::line3d<f32> &shootline,
std::vector<DistanceSortedActiveObject> &dest)
std::vector<DistanceSortedActiveObject> ActiveObjectMgr::getActiveSelectableObjects(const core::line3d<f32> &shootline)
{
std::vector<DistanceSortedActiveObject> dest;
// Imagine a not-axis-aligned cuboid oriented into the direction of the shootline,
// with the width of the object's selection box radius * 2 and with length of the
// shootline (+selection box radius forwards and backwards). We check whether
@ -147,6 +147,7 @@ void ActiveObjectMgr::getActiveSelectableObjects(const core::line3d<f32> &shootl
dest.emplace_back(obj, d);
}
return dest;
}
} // namespace client