From 2c000cca677de50460d829d56fdaef2e715629b6 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Fri, 2 Aug 2024 13:44:47 -0700 Subject: [PATCH] prototype --- src/bot.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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) } }