Performance check showed that I was checking every sprite even if they're way far away so now just do ones near-ish.

This commit is contained in:
Zed A. Shaw 2025-02-25 00:56:54 -05:00
parent 29e6d45dc6
commit 5179709e3c
7 changed files with 13 additions and 13 deletions

View file

@ -152,7 +152,7 @@ TEST_CASE("confirm can iterate through all", "[spatialmap-sort]") {
collider.insert({x,y}, ent);
}
auto sprite_distance = collider.distance_sorted(player);
auto sprite_distance = collider.distance_sorted(player, 10000);
int prev_dist = sprite_distance[0].first;