From 460b375cad05cd1c32a061aeef2fd1dfb3fb95b4 Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Fri, 6 Apr 2018 17:33:43 +0300 Subject: Fix SAOM (#7200) * Bugfix --- src/server/serveractiveobjectmap.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/server/serveractiveobjectmap.h') diff --git a/src/server/serveractiveobjectmap.h b/src/server/serveractiveobjectmap.h index 53ac95e27..60f6890bd 100644 --- a/src/server/serveractiveobjectmap.h +++ b/src/server/serveractiveobjectmap.h @@ -39,6 +39,7 @@ struct ServerActiveObjectMap { ServerActiveObject *object; aabb3s16 box; + v3s16 pos; bool has_box; }; @@ -108,9 +109,6 @@ struct ServerActiveObjectMap * @note Due to inexact nature of floating-point computations, it is * undefined whether an object lying exactly at the boundary is included * in the list or not. - * @note Objects with base position outside of the collision box may not - * be returned. - * @note Objects without valid collision box are not returned. */ std::vector getObjectsInsideRadius(v3f pos, float radius); @@ -134,6 +132,8 @@ struct ServerActiveObjectMap const std::unordered_map &getObjects() const { return objects; } private: + void addObjectRef(u16 id, v3s16 pos); + void removeObjectRef(u16 id, v3s16 pos); void addObjectRefs(u16 id, const aabb3s16 &box); void removeObjectRefs(u16 id, const aabb3s16 &box); std::unordered_set getObjectsNearBox(const aabb3s16 &box); -- cgit v1.2.3