mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-01 17:38:41 +00:00
Improve ServerEnvironment::getRemovedActiveObjects() in many ways
This commit is contained in:
parent
751ede516b
commit
178943b4b7
7 changed files with 56 additions and 73 deletions
|
@ -153,9 +153,9 @@ void ActiveObjectMgr::getObjectsInArea(const aabb3f &box,
|
|||
}
|
||||
}
|
||||
|
||||
void ActiveObjectMgr::getAddedActiveObjectsAroundPos(const v3f &player_pos, f32 radius,
|
||||
f32 player_radius, std::set<u16> ¤t_objects,
|
||||
std::queue<u16> &added_objects)
|
||||
void ActiveObjectMgr::getAddedActiveObjectsAroundPos(v3f player_pos, f32 radius,
|
||||
f32 player_radius, const std::set<u16> ¤t_objects,
|
||||
std::vector<u16> &added_objects)
|
||||
{
|
||||
/*
|
||||
Go through the object list,
|
||||
|
@ -188,7 +188,7 @@ void ActiveObjectMgr::getAddedActiveObjectsAroundPos(const v3f &player_pos, f32
|
|||
if (n != current_objects.end())
|
||||
continue;
|
||||
// Add to added_objects
|
||||
added_objects.push(id);
|
||||
added_objects.push_back(id);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -45,8 +45,8 @@ public:
|
|||
std::vector<ServerActiveObject *> &result,
|
||||
std::function<bool(ServerActiveObject *obj)> include_obj_cb);
|
||||
|
||||
void getAddedActiveObjectsAroundPos(const v3f &player_pos, f32 radius,
|
||||
f32 player_radius, std::set<u16> ¤t_objects,
|
||||
std::queue<u16> &added_objects);
|
||||
void getAddedActiveObjectsAroundPos(v3f player_pos, f32 radius,
|
||||
f32 player_radius, const std::set<u16> ¤t_objects,
|
||||
std::vector<u16> &added_objects);
|
||||
};
|
||||
} // namespace server
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue