Prep for fixing the spatialmap to allow for entities without collision to still be in the space.
This commit is contained in:
parent
d93bc1615c
commit
fd53f92fe6
7 changed files with 27 additions and 53 deletions
|
@ -101,14 +101,10 @@ size_t LevelManager::create_level(shared_ptr<DinkyECS::World> prev_world) {
|
|||
|
||||
size_t index = $levels.size();
|
||||
|
||||
auto collider = make_shared<SpatialMap>();
|
||||
// not sure if this is still needed
|
||||
System::init_positions(*world, *collider);
|
||||
|
||||
auto player = world->get_the<Player>();
|
||||
|
||||
$levels.emplace_back(index, player.entity, map, world,
|
||||
make_shared<LightRender>(map->tiles()), collider);
|
||||
make_shared<LightRender>(map->tiles()), builder.$collision);
|
||||
|
||||
dbc::check(index == $levels.size() - 1, "Level index is not the same as $levels.size() - 1, off by one error");
|
||||
return index;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue