1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-22 17:18:39 +00: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

@ -173,12 +173,12 @@ void TestServerActiveObjectMgr::testGetAddedActiveObjectsAroundPos()
saomgr.registerObject(std::make_unique<MockServerActiveObject>(nullptr, p));
}
std::queue<u16> result;
std::vector<u16> result;
std::set<u16> cur_objects;
saomgr.getAddedActiveObjectsAroundPos(v3f(), 100, 50, cur_objects, result);
UASSERTCMP(int, ==, result.size(), 1);
result = std::queue<u16>();
result.clear();
cur_objects.clear();
saomgr.getAddedActiveObjectsAroundPos(v3f(), 740, 50, cur_objects, result);
UASSERTCMP(int, ==, result.size(), 2);