complete spatial indexing refactor - SpatialMap

This commit is contained in:
Llywelwyn 2023-08-16 01:17:38 +01:00
parent 2887bb9736
commit d439ff6d3f
18 changed files with 351 additions and 217 deletions

View file

@ -247,7 +247,7 @@ pub fn load_game(ecs: &mut World) {
for (e, h) in (&entities, &helper).join() {
let mut worldmap = ecs.write_resource::<super::map::Map>();
*worldmap = h.map.clone();
worldmap.tile_content = vec![Vec::new(); (worldmap.width * worldmap.height) as usize];
crate::spatial::set_size((worldmap.width * worldmap.height) as usize);
deleteme = Some(e);
}
for (e, h) in (&entities, &helper2).join() {