diff --git a/src/bot.rs b/src/bot.rs index 40e1b64..4770484 100644 --- a/src/bot.rs +++ b/src/bot.rs @@ -1,6 +1,5 @@ use binrw::{binrw,BinReaderExt,BinWriterExt}; -use crate::newtypes::instruction::TimedInstruction; -use crate::newtypes::physics::PhysicsInputInstruction; +use crate::newtypes::instruction::TimedPhysicsInstruction; #[derive(Debug)] pub enum Error{ @@ -28,8 +27,9 @@ impl BotDebug{ std::mem::drop(self.file); std::fs::remove_file(self.name) } - pub fn push(&self,ins:TimedInstruction)->Result<(),binrw::Error>{ - self.file.write_le(ins) + pub fn push(&self,ins:strafesnet_common::instruction::TimedInstruction)->Result<(),binrw::Error>{ + let ins:TimedPhysicsInstruction=ins.into(); + self.file.write_le(&ins) } }