read bot debug function

This commit is contained in:
Quaternions 2024-08-05 18:42:52 -07:00
parent 00ac7960e0
commit 4e1ed43161

View File

@ -43,6 +43,14 @@ impl BotDebug{
}
}
pub fn read_bot_debug(mut reader:impl BinReaderExt)->Result<Vec<strafesnet_common::instruction::TimedInstruction<strafesnet_common::physics::Instruction>>,binrw::Error>{
let mut instructions=Vec::new();
while let Ok(ins)=reader.read_le::<TimedPhysicsInstruction>(){
instructions.push(ins.try_into().unwrap());
}
Ok(instructions)
}
/* block types
BLOCK_BOT_HEADER: