work
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user