wip
This commit is contained in:
parent
7479a67e29
commit
320b8726ee
src/newtypes
@ -37,6 +37,24 @@ impl Into<strafesnet_common::gameplay_style::StyleModifiers> for StyleModifiers{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
impl From<strafesnet_common::gameplay_style::StyleModifiers> for StyleModifiers{
|
||||||
|
fn from(value:strafesnet_common::gameplay_style::StyleModifiers)->Self{
|
||||||
|
Self{
|
||||||
|
controls_mask:value.controls_mask.bits(),
|
||||||
|
controls_mask_state:value.controls_mask_state.bits(),
|
||||||
|
strafe:value.strafe.map(Into::into),
|
||||||
|
rocket:value.rocket.map(Into::into),
|
||||||
|
jump:value.jump.map(Into::into),
|
||||||
|
walk:value.walk.map(Into::into),
|
||||||
|
ladder:value.ladder.map(Into::into),
|
||||||
|
swim:value.swim.map(Into::into),
|
||||||
|
gravity:value.gravity.get().to_array(),
|
||||||
|
hitbox:value.hitbox.into(),
|
||||||
|
camera_offset:value.camera_offset.get().to_array(),
|
||||||
|
mass:value.mass.get(),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[binrw::binrw]
|
#[binrw::binrw]
|
||||||
#[brw(little,repr=u8)]
|
#[brw(little,repr=u8)]
|
||||||
|
@ -11,6 +11,14 @@ impl Into<strafesnet_common::integer::Ratio64> for Ratio64{
|
|||||||
strafesnet_common::integer::Ratio64::new(self.num,self.den).unwrap()
|
strafesnet_common::integer::Ratio64::new(self.num,self.den).unwrap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
impl From<strafesnet_common::integer::Ratio64> for Ratio64{
|
||||||
|
fn from(value:strafesnet_common::integer::Ratio64)->Self{
|
||||||
|
Self{
|
||||||
|
num:value.num(),
|
||||||
|
den:value.den(),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[binrw::binrw]
|
#[binrw::binrw]
|
||||||
#[brw(little)]
|
#[brw(little)]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user