rethink physics instructions
This commit is contained in:
parent
97da935d9d
commit
bfcf973524
@ -24,12 +24,14 @@ pub enum PhysicsInputInstruction{
|
||||
#[brw(magic=9u8)]
|
||||
SetZoom(Boolio),
|
||||
#[brw(magic=10u8)]
|
||||
Restart,
|
||||
Reset,
|
||||
#[brw(magic=11u8)]
|
||||
Spawn(super::gameplay_modes::ModeId,super::gameplay_modes::StageId),
|
||||
Restart,
|
||||
#[brw(magic=12u8)]
|
||||
PracticeFly,
|
||||
Spawn(super::gameplay_modes::ModeId,super::gameplay_modes::StageId),
|
||||
#[brw(magic=13u8)]
|
||||
PracticeFly,
|
||||
#[brw(magic=14u8)]
|
||||
SetSensitivity(super::integer::Ratio64Vec2),
|
||||
}
|
||||
#[derive(Debug)]
|
||||
@ -57,6 +59,7 @@ impl TryInto<strafesnet_common::physics::Instruction> for PhysicsInputInstructio
|
||||
PhysicsInputInstruction::SetMoveForward(state)=>strafesnet_common::physics::Instruction::SetMoveForward(state.into()),
|
||||
PhysicsInputInstruction::SetJump(state)=>strafesnet_common::physics::Instruction::SetJump(state.into()),
|
||||
PhysicsInputInstruction::SetZoom(state)=>strafesnet_common::physics::Instruction::SetZoom(state.into()),
|
||||
PhysicsInputInstruction::Reset=>strafesnet_common::physics::Instruction::Reset,
|
||||
PhysicsInputInstruction::Restart=>strafesnet_common::physics::Instruction::Restart,
|
||||
PhysicsInputInstruction::Spawn(mode_id,stage_id)=>strafesnet_common::physics::Instruction::Spawn(
|
||||
strafesnet_common::gameplay_modes::ModeId::new(mode_id),
|
||||
@ -81,6 +84,7 @@ impl TryFrom<strafesnet_common::physics::Instruction> for PhysicsInputInstructio
|
||||
strafesnet_common::physics::Instruction::SetMoveForward(state)=>Ok(PhysicsInputInstruction::SetMoveForward(state.into())),
|
||||
strafesnet_common::physics::Instruction::SetJump(state)=>Ok(PhysicsInputInstruction::SetJump(state.into())),
|
||||
strafesnet_common::physics::Instruction::SetZoom(state)=>Ok(PhysicsInputInstruction::SetZoom(state.into())),
|
||||
strafesnet_common::physics::Instruction::Reset=>Ok(PhysicsInputInstruction::Reset),
|
||||
strafesnet_common::physics::Instruction::Restart=>Ok(PhysicsInputInstruction::Restart),
|
||||
strafesnet_common::physics::Instruction::Spawn(mode_id,stage_id)=>Ok(PhysicsInputInstruction::Spawn(
|
||||
mode_id.get(),
|
||||
|
Loading…
Reference in New Issue
Block a user