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:
parent
29e6d45dc6
commit
5179709e3c
7 changed files with 13 additions and 13 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue