diff options
Diffstat (limited to 'server/editor/src/main.rs')
| -rw-r--r-- | server/editor/src/main.rs | 12 |
1 files changed, 2 insertions, 10 deletions
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) { |