prototype
This commit is contained in:
parent
cd65db0008
commit
2c000cca67
@ -1,6 +1,5 @@
|
|||||||
use binrw::{binrw,BinReaderExt,BinWriterExt};
|
use binrw::{binrw,BinReaderExt,BinWriterExt};
|
||||||
use crate::newtypes::instruction::TimedInstruction;
|
use crate::newtypes::instruction::TimedPhysicsInstruction;
|
||||||
use crate::newtypes::physics::PhysicsInputInstruction;
|
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub enum Error{
|
pub enum Error{
|
||||||
@ -28,8 +27,9 @@ impl BotDebug{
|
|||||||
std::mem::drop(self.file);
|
std::mem::drop(self.file);
|
||||||
std::fs::remove_file(self.name)
|
std::fs::remove_file(self.name)
|
||||||
}
|
}
|
||||||
pub fn push(&self,ins:TimedInstruction<PhysicsInputInstruction>)->Result<(),binrw::Error>{
|
pub fn push(&self,ins:strafesnet_common::instruction::TimedInstruction<strafesnet_common::physics::Instruction>)->Result<(),binrw::Error>{
|
||||||
self.file.write_le(ins)
|
let ins:TimedPhysicsInstruction=ins.into();
|
||||||
|
self.file.write_le(&ins)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user