diff options
author | ubq323 <ubq323@ubq323.website> | 2024-04-13 15:12:17 +0100 |
---|---|---|
committer | ubq323 <ubq323@ubq323.website> | 2024-04-13 15:12:17 +0100 |
commit | 7608e2967954104771b06612e4e6c21ca7811c9f (patch) | |
tree | f36f054130b880d0e71fff2d8014c5a3c4a7c39b /server | |
parent | e4b1dd28018a3462334c695dc11bd0e0f1e8122a (diff) |
client have multiple chunks and recycle them when they are not visible
Diffstat (limited to 'server')
-rw-r--r-- | server/main.ha | 2 |
1 files changed, 1 insertions, 1 deletions
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], |