diff options
| author | metamuffin <metamuffin@disroot.org> | 2026-01-10 17:16:03 +0100 |
|---|---|---|
| committer | tpart <tpart120@proton.me> | 2026-02-26 20:48:35 +0100 |
| commit | b634bad931f530ee0a207e1461ffc5e52ebb83e3 (patch) | |
| tree | 90a45e8c67e6a7c66e49c7409f0c37881eade96e /server/editor/src/main.rs | |
| parent | 0ed9e8387a66b3af78412feea62fdc8b9804f793 (diff) | |
| download | hurrycurry-b634bad931f530ee0a207e1461ffc5e52ebb83e3.tar hurrycurry-b634bad931f530ee0a207e1461ffc5e52ebb83e3.tar.bz2 hurrycurry-b634bad931f530ee0a207e1461ffc5e52ebb83e3.tar.zst | |
compiles with tile stacks
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) { |