Prep for fixing the spatialmap to allow for entities without collision to still be in the space.

This commit is contained in:
Zed A. Shaw 2025-07-29 02:13:29 -04:00
parent d93bc1615c
commit fd53f92fe6
7 changed files with 27 additions and 53 deletions

View file

@ -19,7 +19,7 @@ struct FoundEntities {
class SpatialMap {
public:
SpatialMap() {}
PointEntityMap table;
PointEntityMap yes_collision;
void insert(Point pos, DinkyECS::Entity obj);
void move(Point from, Point to, DinkyECS::Entity ent);
@ -29,5 +29,5 @@ class SpatialMap {
FoundEntities neighbors(Point position, bool diag=false) const;
SortedEntities distance_sorted(Point from, int max_distance);
size_t size() { return table.size(); }
size_t size() { return yes_collision.size(); }
};