1
0
mirror of https://github.com/luanti-org/luanti.git synced 2026-01-14 13:25:21 +01:00

Improve ServerEnvironment::getRemovedActiveObjects() in many ways

This commit is contained in:
sfan5
2024-03-06 18:57:01 +01:00
parent 751ede516b
commit 178943b4b7
7 changed files with 56 additions and 73 deletions

View File

@@ -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> &current_objects,
std::queue<u16> &added_objects)
void ActiveObjectMgr::getAddedActiveObjectsAroundPos(v3f player_pos, f32 radius,
f32 player_radius, const std::set<u16> &current_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);
}
}