prototype

This commit is contained in:
Quaternions 2024-08-02 13:44:47 -07:00
parent cd65db0008
commit 2c000cca67

View File

@ -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<PhysicsInputInstruction>)->Result<(),binrw::Error>{
self.file.write_le(ins)
pub fn push(&self,ins:strafesnet_common::instruction::TimedInstruction<strafesnet_common::physics::Instruction>)->Result<(),binrw::Error>{
let ins:TimedPhysicsInstruction=ins.into();
self.file.write_le(&ins)
}
}