This commit is contained in:
2026-01-26 13:53:51 -05:00
parent e1eff49be9
commit 53ed4775ae
19 changed files with 565 additions and 350 deletions

View File

@@ -1,31 +1,8 @@
use crate::{Client, Rsc};
use iris::core::UiRenderState;
use openworm::net::NetServerMsg;
impl Client {
pub fn debug(&mut self, _rsc: &mut Rsc, render: &mut UiRenderState) {
render.debug_layers();
// let mut file = std::fs::OpenOptions::new()
// .write(true)
// .create(true)
// .truncate(true)
// .open("./old_msgs")
// .unwrap();
// bincode::encode_into_std_write(
// self.msgs.clone(),
// &mut file,
// openworm::net::BINCODE_CONFIG,
// )
// .unwrap();
let mut file = std::fs::OpenOptions::new()
.read(true)
.open("/home/bryan/.local/share/openworm/old_msgs")
.unwrap();
let msgs: Vec<NetServerMsg> =
bincode::decode_from_std_read(&mut file, openworm::net::BINCODE_CONFIG).unwrap();
for msg in msgs {
println!("{msg:?}");
}
// client.ui.debug_layers();
}
}