From 7608e2967954104771b06612e4e6c21ca7811c9f Mon Sep 17 00:00:00 2001 From: ubq323 Date: Sat, 13 Apr 2024 15:12:17 +0100 Subject: client have multiple chunks and recycle them when they are not visible --- server/main.ha | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'server/main.ha') diff --git a/server/main.ha b/server/main.ha index 30e5e0a..4761595 100644 --- a/server/main.ha +++ b/server/main.ha @@ -112,7 +112,6 @@ fn load_picture_from_file(world_pos: pos) (drawing::picture | fs::error | bad_he picture_buf[i] = (file_buf[3*i]:u32<<16) |(file_buf[3*i+1]:u32<<8) |(file_buf[3*i+2]:u32); - if (picture_buf[i] != 0xffffff) fmt::println(i,picture_buf[i])!; }; return drawing::picture { w = CHUNKSIZE, @@ -207,6 +206,7 @@ fn handle_packet(pictures: []drawing::picture, pollfds: []poll::pollfd, packet: fn send_world(conn: io::file, pictures: []drawing::picture) (void | io::error) = { for (const pic &.. pictures) { + fmt::printfln(" sending {},{}",pic.world_pos.0, pic.world_pos.1)!; packet_reader::send(conn, packet_reader::packet_sendchunk { world_pos = pic.world_pos, chunk_data = pic.d[..pic.w*pic.h], -- cgit v1.2.3