Can actually save the game now.

This commit is contained in:
Zed A. Shaw 2024-11-06 22:24:23 -05:00
parent b2ed598c1f
commit 67cacd5dcd
3 changed files with 4 additions and 9 deletions

View file

@ -35,8 +35,10 @@ void System::enemy_pathing(DinkyECS::World &world, Map &game_map, Player &player
void System::init_positions(DinkyECS::World &world) {
auto &collider = world.get_the<spatial_map>();
world.query<Position>([&](const auto &ent, auto &pos) {
collider.insert(pos.location, ent);
world.query<Position, Combat>([&](const auto &ent, auto &pos, auto &combat) {
if(!combat.dead) {
collider.insert(pos.location, ent);
}
});
}