SpatialMap now has a full test suite and that helped find some bugs.
This commit is contained in:
parent
f26189c696
commit
23ead1f0ca
3 changed files with 173 additions and 130 deletions
|
@ -6,7 +6,9 @@ using namespace fmt;
|
|||
using DinkyECS::Entity;
|
||||
|
||||
void SpatialMap::insert(Point pos, Entity ent, bool has_collision) {
|
||||
dbc::check(!occupied(pos), "attempt to insert an entity with collision in space with collision");
|
||||
if(has_collision) {
|
||||
dbc::check(!occupied(pos), "attempt to insert an entity with collision in space with collision");
|
||||
}
|
||||
|
||||
$collision.emplace(pos, CollisionData{ent, has_collision});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue