diff --git a/lib/snf/src/newtypes/physics.rs b/lib/snf/src/newtypes/physics.rs index d83994e..2d849af 100644 --- a/lib/snf/src/newtypes/physics.rs +++ b/lib/snf/src/newtypes/physics.rs @@ -88,6 +88,8 @@ pub enum Instruction{ PracticeFly, #[brw(magic=14u8)] SetSensitivity(super::integer::Ratio64Vec2), + #[brw(magic=255u8)] + Idle, } #[derive(Debug)] pub enum InstructionConvert{ @@ -122,6 +124,7 @@ impl TryInto for Instruction{ )), Instruction::PracticeFly=>strafesnet_common::physics::Instruction::Misc(strafesnet_common::physics::MiscInstruction::PracticeFly), Instruction::SetSensitivity(sensitivity)=>strafesnet_common::physics::Instruction::Misc(strafesnet_common::physics::MiscInstruction::SetSensitivity(sensitivity.try_into()?)), + Instruction::Idle=>strafesnet_common::physics::Instruction::Idle, }) } } @@ -147,7 +150,7 @@ impl TryFrom for Instruction{ )), strafesnet_common::physics::Instruction::Misc(strafesnet_common::physics::MiscInstruction::PracticeFly)=>Ok(Instruction::PracticeFly), strafesnet_common::physics::Instruction::Misc(strafesnet_common::physics::MiscInstruction::SetSensitivity(sensitivity))=>Ok(Instruction::SetSensitivity(sensitivity.into())), - strafesnet_common::physics::Instruction::Idle=>Err(InstructionConvert::DropInstruction), + strafesnet_common::physics::Instruction::Idle=>Ok(Instruction::Idle), } } }