This commit is contained in:
Quaternions 2024-07-29 13:30:48 -07:00
parent 7a03b079d8
commit 17a7e7b738
2 changed files with 6 additions and 9 deletions

@ -3,22 +3,19 @@ use super::integer::{Time,Planar64,Planar64Vec3};
#[binrw::binrw] #[binrw::binrw]
#[brw(little)] #[brw(little)]
pub struct ContactingLadder{ pub struct ContactingLadder{
pub sticky:Option<()>, pub sticky:super::common::Boolio,
} }
impl Into<strafesnet_common::gameplay_attributes::ContactingLadder> for ContactingLadder{ impl Into<strafesnet_common::gameplay_attributes::ContactingLadder> for ContactingLadder{
fn into(self)->strafesnet_common::gameplay_attributes::ContactingLadder{ fn into(self)->strafesnet_common::gameplay_attributes::ContactingLadder{
strafesnet_common::gameplay_attributes::ContactingLadder{ strafesnet_common::gameplay_attributes::ContactingLadder{
sticky:self.sticky.is_some(), sticky:self.sticky.into(),
} }
} }
} }
impl From<strafesnet_common::gameplay_attributes::ContactingLadder> for ContactingLadder{ impl From<strafesnet_common::gameplay_attributes::ContactingLadder> for ContactingLadder{
fn from(value:strafesnet_common::gameplay_attributes::ContactingLadder)->Self{ fn from(value:strafesnet_common::gameplay_attributes::ContactingLadder)->Self{
Self{ Self{
sticky:match value.sticky{ sticky:value.sticky.into(),
true=>Some(()),
false=>None,
}
} }
} }
} }

@ -41,13 +41,13 @@ pub struct StageElement{
pub stage_id:u32,//which stage spawn to send to pub stage_id:u32,//which stage spawn to send to
pub behaviour:StageElementBehaviour, pub behaviour:StageElementBehaviour,
pub jump_limit:Option<u8>, pub jump_limit:Option<u8>,
pub force:Option<()>,//allow setting to lower spawn id i.e. 7->3 pub force:super::common::Boolio,//allow setting to lower spawn id i.e. 7->3
} }
impl Into<strafesnet_common::gameplay_modes::StageElement> for StageElement{ impl Into<strafesnet_common::gameplay_modes::StageElement> for StageElement{
fn into(self)->strafesnet_common::gameplay_modes::StageElement{ fn into(self)->strafesnet_common::gameplay_modes::StageElement{
strafesnet_common::gameplay_modes::StageElement::new( strafesnet_common::gameplay_modes::StageElement::new(
strafesnet_common::gameplay_modes::StageId::new(self.stage_id), strafesnet_common::gameplay_modes::StageId::new(self.stage_id),
self.force.is_some(), self.force.into(),
self.behaviour.into(), self.behaviour.into(),
self.jump_limit, self.jump_limit,
) )
@ -59,7 +59,7 @@ impl From<strafesnet_common::gameplay_modes::StageElement> for StageElement{
stage_id:value.stage_id().get(), stage_id:value.stage_id().get(),
behaviour:value.behaviour().into(), behaviour:value.behaviour().into(),
jump_limit:value.jump_limit(), jump_limit:value.jump_limit(),
force:match value.force(){true=>Some(()),false=>None}, force:value.force().into(),
} }
} }
} }