From b634bad931f530ee0a207e1461ffc5e52ebb83e3 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Sat, 10 Jan 2026 17:16:03 +0100 Subject: compiles with tile stacks --- server/editor/src/main.rs | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'server/editor/src/main.rs') diff --git a/server/editor/src/main.rs b/server/editor/src/main.rs index 86cb4b40..1751b1f5 100644 --- a/server/editor/src/main.rs +++ b/server/editor/src/main.rs @@ -143,7 +143,7 @@ async fn handle_conn( }); state.out.push(PacketC::Data { data: Box::new(Gamedata { - tile_walkable: (0..TILES.len()).map(TileIndex).collect(), + tile_collide: (0..TILES.len()).map(TileIndex).collect(), tile_placeable_items: BTreeMap::new(), tile_names: TILES.iter().map(|(name, _, _)| name.to_string()).collect(), current_map: "editor".to_owned(), @@ -235,17 +235,9 @@ impl State { if !self.dirty_tiles.is_empty() { for p in self.dirty_tiles.drain() { self.out.push(PacketC::UpdateMap { - tile: p, - kind: self.tiles.get(&p).copied(), - neighbors: [ - self.tiles.get(&(p + IVec2::NEG_Y)).copied(), - self.tiles.get(&(p + IVec2::NEG_X)).copied(), - self.tiles.get(&(p + IVec2::Y)).copied(), - self.tiles.get(&(p + IVec2::X)).copied(), - ], + changes: vec![(p, self.tiles.get(&p).copied().into_iter().collect())], }) } - self.out.push(PacketC::FlushMap); } } pub fn build_start_platform(&mut self) { -- cgit v1.3