delete Boolio
This commit is contained in:
parent
39a7c31d32
commit
0dc2d1f89e
@ -1,26 +1,3 @@
|
|||||||
pub const fn flag(b:bool,mask:u8)->u8{
|
pub const fn flag(b:bool,mask:u8)->u8{
|
||||||
(-(b as i8) as u8)&mask
|
(-(b as i8) as u8)&mask
|
||||||
}
|
}
|
||||||
|
|
||||||
#[binrw::binrw]
|
|
||||||
#[brw(little,repr=u8)]
|
|
||||||
pub enum Boolio{
|
|
||||||
True,
|
|
||||||
False
|
|
||||||
}
|
|
||||||
impl Into<bool> for Boolio{
|
|
||||||
fn into(self)->bool{
|
|
||||||
match self{
|
|
||||||
Boolio::True=>true,
|
|
||||||
Boolio::False=>false,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
impl From<bool> for Boolio{
|
|
||||||
fn from(value:bool)->Self{
|
|
||||||
match value{
|
|
||||||
true=>Boolio::True,
|
|
||||||
false=>Boolio::False,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
@ -1,10 +1,12 @@
|
|||||||
use super::common::{flag,Boolio};
|
use super::common::flag;
|
||||||
use super::integer::{Time,Planar64,Planar64Vec3};
|
use super::integer::{Time,Planar64,Planar64Vec3};
|
||||||
|
|
||||||
#[binrw::binrw]
|
#[binrw::binrw]
|
||||||
#[brw(little)]
|
#[brw(little)]
|
||||||
pub struct ContactingLadder{
|
pub struct ContactingLadder{
|
||||||
pub sticky:Boolio,
|
#[br(map=|paused:u8|paused!=0)]
|
||||||
|
#[bw(map=|paused:&bool|*paused as u8)]
|
||||||
|
pub sticky:bool,
|
||||||
}
|
}
|
||||||
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{
|
||||||
|
Loading…
Reference in New Issue
Block a user