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

Allow managing object observers

-----

Co-authored-by: sfan5 <sfan5@live.de>
Co-authored-by: SmallJoker <SmallJoker@users.noreply.github.com>
This commit is contained in:
Lars Mueller
2023-11-12 15:28:29 +01:00
committed by sfan5
parent cc8e7a569e
commit 6874c358ea
15 changed files with 284 additions and 22 deletions

View File

@@ -38,15 +38,18 @@ public:
bool registerObject(std::unique_ptr<ServerActiveObject> obj) override;
void removeObject(u16 id) override;
void invalidateActiveObjectObserverCaches();
void getObjectsInsideRadius(const v3f &pos, float radius,
std::vector<ServerActiveObject *> &result,
std::function<bool(ServerActiveObject *obj)> include_obj_cb);
void getObjectsInArea(const aabb3f &box,
std::vector<ServerActiveObject *> &result,
std::function<bool(ServerActiveObject *obj)> include_obj_cb);
void getAddedActiveObjectsAroundPos(v3f player_pos, f32 radius,
f32 player_radius, const std::set<u16> &current_objects,
void getAddedActiveObjectsAroundPos(
const v3f &player_pos, const std::string &player_name,
f32 radius, f32 player_radius,
const std::set<u16> &current_objects,
std::vector<u16> &added_objects);
};
} // namespace server