Update tests and some more

This commit is contained in:
Lol3rrr
2024-09-21 21:53:41 +02:00
parent ba237795fd
commit 6d89de0663
5 changed files with 428 additions and 374 deletions

View File

@@ -3,6 +3,7 @@ use super::{decoder, propcontroller, Class, Entity, FirstPassError, Paths};
pub struct EntityContext {
pub entities: std::collections::HashMap<i32, Entity>,
pub cls_to_class: std::collections::HashMap<u32, Class>,
pub filter: EntityFilter,
}
#[derive(Debug, Clone)]
@@ -19,16 +20,39 @@ pub struct EntityProp {
pub value: super::variant::Variant,
}
pub struct EntityFilter {
pub enabled: bool,
entity: Box<dyn FnMut(&str) -> bool>,
}
impl EntityFilter {
pub fn all() -> Self {
Self {
enabled: true,
entity: Box::new(|_| true),
}
}
pub fn disabled() -> Self {
Self {
enabled: false,
entity: Box::new(|_| false),
}
}
}
impl EntityContext {
/// Returns the `cls_id`
pub fn create_entity(&mut self, entity_id: i32, bitreader: &mut crate::bitreader::Bitreader) -> Result<u32, super::FirstPassError> {
pub fn create_entity(
&mut self,
entity_id: i32,
bitreader: &mut crate::bitreader::Bitreader,
) -> Result<u32, super::FirstPassError> {
let cls_id: u32 = bitreader.read_nbits(8)?;
let _serial = bitreader.read_nbits(17)?;
let _unknown = bitreader.read_varint()?;
self.entities.insert(entity_id, Entity {
cls: cls_id,
});
self.entities.insert(entity_id, Entity { cls: cls_id });
Ok(cls_id)
}
@@ -41,7 +65,7 @@ impl EntityContext {
paths: &mut Paths,
qf_mapper: &mut decoder::QfMapper,
prop_controller: &propcontroller::PropController,
) -> Result<(usize, EntityState), FirstPassError> {
) -> Result<Option<(usize, EntityState)>, FirstPassError> {
let entity = match self.entities.get_mut(&entity_id) {
Some(e) => e,
None => panic!("ID: {:?} - Entities: {:?}", entity_id, self.entities),
@@ -73,10 +97,17 @@ impl EntityContext {
}
}
Ok((n_updates, EntityState {
class: class.name.clone(),
cls: entity.cls,
props: fields,
}))
if !(self.filter.entity)(class.name.as_str()) {
return Ok(None);
}
Ok(Some((
n_updates,
EntityState {
class: class.name.clone(),
cls: entity.cls,
props: fields,
},
)))
}
}

View File

@@ -103,51 +103,55 @@ impl FieldPath {
}
}
pub fn do_op(&mut self, bitreader: &mut crate::bitreader::Bitreader, symbol: u8) -> Result<(), super::FirstPassError> {
pub fn do_op(
&mut self,
bitreader: &mut crate::bitreader::Bitreader,
symbol: u8,
) -> Result<(), super::FirstPassError> {
use ops::*;
match symbol {
0 => plus_one(bitreader, self),
1 => plus_two(bitreader, self),
2 => plus_three(bitreader, self),
3 => plus_four(bitreader, self),
4 => plus_n(bitreader, self),
5 => push_one_left_delta_zero_right_zero(bitreader, self),
6 => push_one_left_delta_zero_right_non_zero(bitreader, self),
7 => push_one_left_delta_one_right_zero(bitreader, self),
8 => push_one_left_delta_one_right_non_zero(bitreader, self),
9 => push_one_left_delta_n_right_zero(bitreader, self),
10 => push_one_left_delta_n_right_non_zero(bitreader, self),
11 => push_one_left_delta_n_right_non_zero_pack6_bits(bitreader, self),
12 => push_one_left_delta_n_right_non_zero_pack8_bits(bitreader, self),
13 => push_two_left_delta_zero(bitreader, self),
14 => push_two_pack5_left_delta_zero(bitreader, self),
15 => push_three_left_delta_zero(bitreader, self),
16 => push_three_pack5_left_delta_zero(bitreader, self),
17 => push_two_left_delta_one(bitreader, self),
18 => push_two_pack5_left_delta_one(bitreader, self),
19 => push_three_left_delta_one(bitreader, self),
20 => push_three_pack5_left_delta_one(bitreader, self),
21 => push_two_left_delta_n(bitreader, self),
22 => push_two_pack5_left_delta_n(bitreader, self),
23 => push_three_left_delta_n(bitreader, self),
24 => push_three_pack5_left_delta_n(bitreader, self),
25 => push_n(bitreader, self),
26 => push_n_and_non_topological(bitreader, self),
27 => pop_one_plus_one(bitreader, self),
28 => pop_one_plus_n(bitreader, self),
29 => pop_all_but_one_plus_one(bitreader, self),
30 => pop_all_but_one_plus_n(bitreader, self),
31 => pop_all_but_one_plus_n_pack3_bits(bitreader, self),
32 => pop_all_but_one_plus_n_pack6_bits(bitreader, self),
33 => pop_n_plus_one(bitreader, self),
34 => pop_n_plus_n(bitreader, self),
35 => pop_n_and_non_topographical(bitreader, self),
36 => non_topo_complex(bitreader, self),
37 => non_topo_penultimate_plus_one(bitreader, self),
38 => non_topo_complex_pack4_bits(bitreader, self),
other => todo!("Other OP: {:?}", other),
}
0 => plus_one(bitreader, self),
1 => plus_two(bitreader, self),
2 => plus_three(bitreader, self),
3 => plus_four(bitreader, self),
4 => plus_n(bitreader, self),
5 => push_one_left_delta_zero_right_zero(bitreader, self),
6 => push_one_left_delta_zero_right_non_zero(bitreader, self),
7 => push_one_left_delta_one_right_zero(bitreader, self),
8 => push_one_left_delta_one_right_non_zero(bitreader, self),
9 => push_one_left_delta_n_right_zero(bitreader, self),
10 => push_one_left_delta_n_right_non_zero(bitreader, self),
11 => push_one_left_delta_n_right_non_zero_pack6_bits(bitreader, self),
12 => push_one_left_delta_n_right_non_zero_pack8_bits(bitreader, self),
13 => push_two_left_delta_zero(bitreader, self),
14 => push_two_pack5_left_delta_zero(bitreader, self),
15 => push_three_left_delta_zero(bitreader, self),
16 => push_three_pack5_left_delta_zero(bitreader, self),
17 => push_two_left_delta_one(bitreader, self),
18 => push_two_pack5_left_delta_one(bitreader, self),
19 => push_three_left_delta_one(bitreader, self),
20 => push_three_pack5_left_delta_one(bitreader, self),
21 => push_two_left_delta_n(bitreader, self),
22 => push_two_pack5_left_delta_n(bitreader, self),
23 => push_three_left_delta_n(bitreader, self),
24 => push_three_pack5_left_delta_n(bitreader, self),
25 => push_n(bitreader, self),
26 => push_n_and_non_topological(bitreader, self),
27 => pop_one_plus_one(bitreader, self),
28 => pop_one_plus_n(bitreader, self),
29 => pop_all_but_one_plus_one(bitreader, self),
30 => pop_all_but_one_plus_n(bitreader, self),
31 => pop_all_but_one_plus_n_pack3_bits(bitreader, self),
32 => pop_all_but_one_plus_n_pack6_bits(bitreader, self),
33 => pop_n_plus_one(bitreader, self),
34 => pop_n_plus_n(bitreader, self),
35 => pop_n_and_non_topographical(bitreader, self),
36 => non_topo_complex(bitreader, self),
37 => non_topo_penultimate_plus_one(bitreader, self),
38 => non_topo_complex_pack4_bits(bitreader, self),
other => todo!("Other OP: {:?}", other),
}
}
}

View File

@@ -90,8 +90,8 @@ impl ValueField {
decoder,
name: name.to_string(),
prop_id: 0,
should_parse: false,
full_name: "None ".to_string() + name,
should_parse: true,
full_name: "CWorld.".to_string() + name,
}
}
}
@@ -597,7 +597,6 @@ mod tests {
use pretty_assertions::assert_eq;
#[test]
#[ignore = "Testing"]
fn parse_ancient_example_msg() {
use decoder::Decoder::*;
use Field::*;
@@ -625,23 +624,23 @@ mod tests {
Value(ValueField {
decoder: FloatSimulationTimeDecoder,
name: "m_flAnimTime".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_flAnimTime".to_string(),
should_parse: true,
prop_id: 27022,
full_name: "CWorld.m_flAnimTime".to_string(),
}),
Value(ValueField {
decoder: FloatSimulationTimeDecoder,
name: "m_flSimulationTime".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_flSimulationTime".to_string(),
should_parse: true,
prop_id: 27023,
full_name: "CWorld.m_flSimulationTime".to_string(),
}),
Value(ValueField {
decoder: UnsignedDecoder,
name: "m_hOwnerEntity".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_hOwnerEntity".to_string(),
should_parse: true,
prop_id: 27024,
full_name: "CWorld.m_hOwnerEntity".to_string(),
}),
Pointer(PointerField {
decoder: BooleanDecoder,
@@ -651,142 +650,142 @@ mod tests {
Value(ValueField {
decoder: UnsignedDecoder,
name: "m_cellX".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_cellX".to_string(),
should_parse: true,
prop_id: 27025,
full_name: "CWorld.CBodyComponentBaseModelEntity.m_cellX".to_string(),
}),
Value(ValueField {
decoder: UnsignedDecoder,
name: "m_cellY".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_cellY".to_string(),
should_parse: true,
prop_id: 27026,
full_name: "CWorld.CBodyComponentBaseModelEntity.m_cellY".to_string(),
}),
Value(ValueField {
decoder: UnsignedDecoder,
name: "m_cellZ".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_cellZ".to_string(),
should_parse: true,
prop_id: 27027,
full_name: "CWorld.CBodyComponentBaseModelEntity.m_cellZ".to_string(),
}),
Value(ValueField {
decoder: QuantalizedFloatDecoder(0),
name: "m_vecX".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_vecX".to_string(),
should_parse: true,
prop_id: 27028,
full_name: "CWorld.CBodyComponentBaseModelEntity.m_vecX".to_string(),
}),
Value(ValueField {
decoder: QuantalizedFloatDecoder(1),
name: "m_vecY".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_vecY".to_string(),
should_parse: true,
prop_id: 27029,
full_name: "CWorld.CBodyComponentBaseModelEntity.m_vecY".to_string(),
}),
Value(ValueField {
decoder: QuantalizedFloatDecoder(2),
name: "m_vecZ".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_vecZ".to_string(),
should_parse: true,
prop_id: 27030,
full_name: "CWorld.CBodyComponentBaseModelEntity.m_vecZ".to_string(),
}),
Value(ValueField {
decoder: UnsignedDecoder,
name: "m_hParent".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_hParent".to_string(),
should_parse: true,
prop_id: 27031,
full_name: "CWorld.CBodyComponentBaseModelEntity.m_hParent".to_string(),
}),
Value(ValueField {
decoder: QanglePresDecoder,
name: "m_angRotation".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_angRotation".to_string(),
should_parse: true,
prop_id: 27032,
full_name: "CWorld.CBodyComponentBaseModelEntity.m_angRotation".to_string(),
}),
Value(ValueField {
decoder: NoscaleDecoder,
name: "m_flScale".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_flScale".to_string(),
should_parse: true,
prop_id: 27033,
full_name: "CWorld.CBodyComponentBaseModelEntity.m_flScale".to_string(),
}),
Value(ValueField {
decoder: UnsignedDecoder,
name: "m_name".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_name".to_string(),
should_parse: true,
prop_id: 27034,
full_name: "CWorld.CBodyComponentBaseModelEntity.m_name".to_string(),
}),
Value(ValueField {
decoder: UnsignedDecoder,
name: "m_hierarchyAttachName".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_hierarchyAttachName".to_string(),
should_parse: true,
prop_id: 27035,
full_name: "CWorld.CBodyComponentBaseModelEntity.m_hierarchyAttachName".to_string(),
}),
Value(ValueField {
decoder: Unsigned64Decoder,
name: "m_hModel".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_hModel".to_string(),
should_parse: true,
prop_id: 27036,
full_name: "CWorld.CBodyComponentBaseModelEntity.m_hModel".to_string(),
}),
Value(ValueField {
decoder: BooleanDecoder,
name: "m_bClientClothCreationSuppressed".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_bClientClothCreationSuppressed".to_string(),
should_parse: true,
prop_id: 27037,
full_name: "CWorld.CBodyComponentBaseModelEntity.m_bClientClothCreationSuppressed".to_string(),
}),
Value(ValueField {
decoder: Unsigned64Decoder,
name: "m_MeshGroupMask".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_MeshGroupMask".to_string(),
should_parse: true,
prop_id: 27038,
full_name: "CWorld.CBodyComponentBaseModelEntity.m_MeshGroupMask".to_string(),
}),
Value(ValueField {
decoder: SignedDecoder,
name: "m_nIdealMotionType".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_nIdealMotionType".to_string(),
should_parse: true,
prop_id: 27039,
full_name: "CWorld.CBodyComponentBaseModelEntity.m_nIdealMotionType".to_string(),
}),
Value(ValueField {
decoder: BooleanDecoder,
name: "m_bIsAnimationEnabled".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_bIsAnimationEnabled".to_string(),
should_parse: true,
prop_id: 27040,
full_name: "CWorld.CBodyComponentBaseModelEntity.m_bIsAnimationEnabled".to_string(),
}),
Value(ValueField {
decoder: BooleanDecoder,
name: "m_bUseParentRenderBounds".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_bUseParentRenderBounds".to_string(),
should_parse: true,
prop_id: 27041,
full_name: "CWorld.CBodyComponentBaseModelEntity.m_bUseParentRenderBounds".to_string(),
}),
Value(ValueField {
decoder: UnsignedDecoder,
name: "m_materialGroup".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_materialGroup".to_string(),
should_parse: true,
prop_id: 27042,
full_name: "CWorld.CBodyComponentBaseModelEntity.m_materialGroup".to_string(),
}),
Value(ValueField {
decoder: UnsignedDecoder,
name: "m_nHitboxSet".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_nHitboxSet".to_string(),
should_parse: true,
prop_id: 27043,
full_name: "CWorld.CBodyComponentBaseModelEntity.m_nHitboxSet".to_string(),
}),
Value(ValueField {
decoder: UnsignedDecoder,
name: "m_nOutsideWorld".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_nOutsideWorld".to_string(),
should_parse: true,
prop_id: 27044,
full_name: "CWorld.CBodyComponentBaseModelEntity.m_nOutsideWorld".to_string(),
}),
]
.to_vec(),
@@ -799,9 +798,9 @@ mod tests {
fields: [Value(ValueField {
decoder: SignedDecoder,
name: "m_nameStringableIndex".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_nameStringableIndex".to_string(),
should_parse: true,
prop_id: 27045,
full_name: "CWorld.CEntityIdentity.m_nameStringableIndex".to_string(),
})]
.to_vec(),
},
@@ -809,121 +808,121 @@ mod tests {
Value(ValueField {
decoder: BooleanDecoder,
name: "m_bVisibleinPVS".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_bVisibleinPVS".to_string(),
should_parse: true,
prop_id: 27046,
full_name: "CWorld.m_bVisibleinPVS".to_string(),
}),
Value(ValueField {
decoder: BooleanDecoder,
name: "m_bIsPlatform".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_bIsPlatform".to_string(),
should_parse: true,
prop_id: 27047,
full_name: "CWorld.m_bIsPlatform".to_string(),
}),
Value(ValueField {
decoder: Unsigned64Decoder,
name: "m_MoveCollide".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_MoveCollide".to_string(),
should_parse: true,
prop_id: 27048,
full_name: "CWorld.m_MoveCollide".to_string(),
}),
Value(ValueField {
decoder: Unsigned64Decoder,
name: "m_MoveType".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_MoveType".to_string(),
should_parse: true,
prop_id: 27049,
full_name: "CWorld.m_MoveType".to_string(),
}),
Value(ValueField {
decoder: UnsignedDecoder,
name: "m_nSubclassID".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_nSubclassID".to_string(),
should_parse: true,
prop_id: 27050,
full_name: "CWorld.m_nSubclassID".to_string(),
}),
Value(ValueField {
decoder: NoscaleDecoder,
name: "m_flCreateTime".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_flCreateTime".to_string(),
should_parse: true,
prop_id: 27051,
full_name: "CWorld.m_flCreateTime".to_string(),
}),
Value(ValueField {
decoder: UnsignedDecoder,
name: "m_ubInterpolationFrame".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_ubInterpolationFrame".to_string(),
should_parse: true,
prop_id: 27052,
full_name: "CWorld.m_ubInterpolationFrame".to_string(),
}),
Value(ValueField {
decoder: UnsignedDecoder,
name: "m_iTeamNum".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_iTeamNum".to_string(),
should_parse: true,
prop_id: 27053,
full_name: "CWorld.m_iTeamNum".to_string(),
}),
Value(ValueField {
decoder: UnsignedDecoder,
name: "m_hEffectEntity".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_hEffectEntity".to_string(),
should_parse: true,
prop_id: 27054,
full_name: "CWorld.m_hEffectEntity".to_string(),
}),
Value(ValueField {
decoder: UnsignedDecoder,
name: "m_fEffects".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_fEffects".to_string(),
should_parse: true,
prop_id: 27055,
full_name: "CWorld.m_fEffects".to_string(),
}),
Value(ValueField {
decoder: FloatCoordDecoder,
name: "m_flElasticity".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_flElasticity".to_string(),
should_parse: true,
prop_id: 27056,
full_name: "CWorld.m_flElasticity".to_string(),
}),
Value(ValueField {
decoder: BooleanDecoder,
name: "m_bAnimatedEveryTick".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_bAnimatedEveryTick".to_string(),
should_parse: true,
prop_id: 27057,
full_name: "CWorld.m_bAnimatedEveryTick".to_string(),
}),
Value(ValueField {
decoder: NoscaleDecoder,
name: "m_flNavIgnoreUntilTime".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_flNavIgnoreUntilTime".to_string(),
should_parse: true,
prop_id: 27058,
full_name: "CWorld.m_flNavIgnoreUntilTime".to_string(),
}),
Value(ValueField {
decoder: UnsignedDecoder,
name: "m_nBloodType".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_nBloodType".to_string(),
should_parse: true,
prop_id: 27059,
full_name: "CWorld.m_nBloodType".to_string(),
}),
Value(ValueField {
decoder: Unsigned64Decoder,
name: "m_nRenderMode".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_nRenderMode".to_string(),
should_parse: true,
prop_id: 27060,
full_name: "CWorld.m_nRenderMode".to_string(),
}),
Value(ValueField {
decoder: Unsigned64Decoder,
name: "m_nRenderFX".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_nRenderFX".to_string(),
should_parse: true,
prop_id: 27061,
full_name: "CWorld.m_nRenderFX".to_string(),
}),
Value(ValueField {
decoder: UnsignedDecoder,
name: "m_clrRender".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_clrRender".to_string(),
should_parse: true,
prop_id: 27062,
full_name: "CWorld.m_clrRender".to_string(),
}),
Vector(VectorField {
field_enum: Box::new(Serializer(SerializerField {
@@ -933,16 +932,16 @@ mod tests {
Value(ValueField {
decoder: UnsignedDecoder,
name: "m_ID".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_ID".to_string(),
should_parse: true,
prop_id: 27065,
full_name: "CWorld.EntityRenderAttribute_t.m_ID".to_string(),
}),
Value(ValueField {
decoder: VectorNoscaleDecoder,
name: "m_Values".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_Values".to_string(),
should_parse: true,
prop_id: 27066,
full_name: "CWorld.EntityRenderAttribute_t.m_Values".to_string(),
}),
]
.to_vec(),
@@ -953,304 +952,304 @@ mod tests {
Value(ValueField {
decoder: BooleanDecoder,
name: "m_bRenderToCubemaps".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_bRenderToCubemaps".to_string(),
should_parse: true,
prop_id: 27067,
full_name: "CWorld.m_bRenderToCubemaps".to_string(),
}),
Value(ValueField {
decoder: Unsigned64Decoder,
name: "m_nInteractsAs".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_nInteractsAs".to_string(),
should_parse: true,
prop_id: 27068,
full_name: "CWorld.m_nInteractsAs".to_string(),
}),
Value(ValueField {
decoder: Unsigned64Decoder,
name: "m_nInteractsWith".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_nInteractsWith".to_string(),
should_parse: true,
prop_id: 27069,
full_name: "CWorld.m_nInteractsWith".to_string(),
}),
Value(ValueField {
decoder: Unsigned64Decoder,
name: "m_nInteractsExclude".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_nInteractsExclude".to_string(),
should_parse: true,
prop_id: 27070,
full_name: "CWorld.m_nInteractsExclude".to_string(),
}),
Value(ValueField {
decoder: UnsignedDecoder,
name: "m_nEntityId".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_nEntityId".to_string(),
should_parse: true,
prop_id: 27071,
full_name: "CWorld.m_nEntityId".to_string(),
}),
Value(ValueField {
decoder: UnsignedDecoder,
name: "m_nOwnerId".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_nOwnerId".to_string(),
should_parse: true,
prop_id: 27072,
full_name: "CWorld.m_nOwnerId".to_string(),
}),
Value(ValueField {
decoder: UnsignedDecoder,
name: "m_nHierarchyId".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_nHierarchyId".to_string(),
should_parse: true,
prop_id: 27073,
full_name: "CWorld.m_nHierarchyId".to_string(),
}),
Value(ValueField {
decoder: UnsignedDecoder,
name: "m_nCollisionGroup".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_nCollisionGroup".to_string(),
should_parse: true,
prop_id: 27074,
full_name: "CWorld.m_nCollisionGroup".to_string(),
}),
Value(ValueField {
decoder: UnsignedDecoder,
name: "m_nCollisionFunctionMask".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_nCollisionFunctionMask".to_string(),
should_parse: true,
prop_id: 27075,
full_name: "CWorld.m_nCollisionFunctionMask".to_string(),
}),
Value(ValueField {
decoder: VectorNoscaleDecoder,
name: "m_vecMins".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_vecMins".to_string(),
should_parse: true,
prop_id: 27076,
full_name: "CWorld.m_vecMins".to_string(),
}),
Value(ValueField {
decoder: VectorNoscaleDecoder,
name: "m_vecMaxs".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_vecMaxs".to_string(),
should_parse: true,
prop_id: 27077,
full_name: "CWorld.m_vecMaxs".to_string(),
}),
Value(ValueField {
decoder: UnsignedDecoder,
name: "m_usSolidFlags".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_usSolidFlags".to_string(),
should_parse: true,
prop_id: 27078,
full_name: "CWorld.m_usSolidFlags".to_string(),
}),
Value(ValueField {
decoder: Unsigned64Decoder,
name: "m_nSolidType".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_nSolidType".to_string(),
should_parse: true,
prop_id: 27079,
full_name: "CWorld.m_nSolidType".to_string(),
}),
Value(ValueField {
decoder: UnsignedDecoder,
name: "m_triggerBloat".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_triggerBloat".to_string(),
should_parse: true,
prop_id: 27080,
full_name: "CWorld.m_triggerBloat".to_string(),
}),
Value(ValueField {
decoder: Unsigned64Decoder,
name: "m_nSurroundType".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_nSurroundType".to_string(),
should_parse: true,
prop_id: 27081,
full_name: "CWorld.m_nSurroundType".to_string(),
}),
Value(ValueField {
decoder: UnsignedDecoder,
name: "m_CollisionGroup".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_CollisionGroup".to_string(),
should_parse: true,
prop_id: 27082,
full_name: "CWorld.m_CollisionGroup".to_string(),
}),
Value(ValueField {
decoder: UnsignedDecoder,
name: "m_nEnablePhysics".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_nEnablePhysics".to_string(),
should_parse: true,
prop_id: 27083,
full_name: "CWorld.m_nEnablePhysics".to_string(),
}),
Value(ValueField {
decoder: VectorNoscaleDecoder,
name: "m_vecSpecifiedSurroundingMins".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_vecSpecifiedSurroundingMins".to_string(),
should_parse: true,
prop_id: 27084,
full_name: "CWorld.m_vecSpecifiedSurroundingMins".to_string(),
}),
Value(ValueField {
decoder: VectorNoscaleDecoder,
name: "m_vecSpecifiedSurroundingMaxs".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_vecSpecifiedSurroundingMaxs".to_string(),
should_parse: true,
prop_id: 27085,
full_name: "CWorld.m_vecSpecifiedSurroundingMaxs".to_string(),
}),
Value(ValueField {
decoder: VectorNoscaleDecoder,
name: "m_vCapsuleCenter1".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_vCapsuleCenter1".to_string(),
should_parse: true,
prop_id: 27086,
full_name: "CWorld.m_vCapsuleCenter1".to_string(),
}),
Value(ValueField {
decoder: VectorNoscaleDecoder,
name: "m_vCapsuleCenter2".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_vCapsuleCenter2".to_string(),
should_parse: true,
prop_id: 27087,
full_name: "CWorld.m_vCapsuleCenter2".to_string(),
}),
Value(ValueField {
decoder: NoscaleDecoder,
name: "m_flCapsuleRadius".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_flCapsuleRadius".to_string(),
should_parse: true,
prop_id: 27088,
full_name: "CWorld.m_flCapsuleRadius".to_string(),
}),
Value(ValueField {
decoder: SignedDecoder,
name: "m_iGlowType".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_iGlowType".to_string(),
should_parse: true,
prop_id: 27089,
full_name: "CWorld.m_iGlowType".to_string(),
}),
Value(ValueField {
decoder: SignedDecoder,
name: "m_iGlowTeam".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_iGlowTeam".to_string(),
should_parse: true,
prop_id: 27090,
full_name: "CWorld.m_iGlowTeam".to_string(),
}),
Value(ValueField {
decoder: SignedDecoder,
name: "m_nGlowRange".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_nGlowRange".to_string(),
should_parse: true,
prop_id: 27091,
full_name: "CWorld.m_nGlowRange".to_string(),
}),
Value(ValueField {
decoder: SignedDecoder,
name: "m_nGlowRangeMin".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_nGlowRangeMin".to_string(),
should_parse: true,
prop_id: 27092,
full_name: "CWorld.m_nGlowRangeMin".to_string(),
}),
Value(ValueField {
decoder: UnsignedDecoder,
name: "m_glowColorOverride".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_glowColorOverride".to_string(),
should_parse: true,
prop_id: 27093,
full_name: "CWorld.m_glowColorOverride".to_string(),
}),
Value(ValueField {
decoder: BooleanDecoder,
name: "m_bFlashing".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_bFlashing".to_string(),
should_parse: true,
prop_id: 27094,
full_name: "CWorld.m_bFlashing".to_string(),
}),
Value(ValueField {
decoder: NoscaleDecoder,
name: "m_flGlowTime".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_flGlowTime".to_string(),
should_parse: true,
prop_id: 27095,
full_name: "CWorld.m_flGlowTime".to_string(),
}),
Value(ValueField {
decoder: NoscaleDecoder,
name: "m_flGlowStartTime".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_flGlowStartTime".to_string(),
should_parse: true,
prop_id: 27096,
full_name: "CWorld.m_flGlowStartTime".to_string(),
}),
Value(ValueField {
decoder: BooleanDecoder,
name: "m_bEligibleForScreenHighlight".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_bEligibleForScreenHighlight".to_string(),
should_parse: true,
prop_id: 27097,
full_name: "CWorld.m_bEligibleForScreenHighlight".to_string(),
}),
Value(ValueField {
decoder: NoscaleDecoder,
name: "m_flGlowBackfaceMult".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_flGlowBackfaceMult".to_string(),
should_parse: true,
prop_id: 27098,
full_name: "CWorld.m_flGlowBackfaceMult".to_string(),
}),
Value(ValueField {
decoder: NoscaleDecoder,
name: "m_fadeMinDist".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_fadeMinDist".to_string(),
should_parse: true,
prop_id: 27099,
full_name: "CWorld.m_fadeMinDist".to_string(),
}),
Value(ValueField {
decoder: NoscaleDecoder,
name: "m_fadeMaxDist".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_fadeMaxDist".to_string(),
should_parse: true,
prop_id: 27100,
full_name: "CWorld.m_fadeMaxDist".to_string(),
}),
Value(ValueField {
decoder: NoscaleDecoder,
name: "m_flFadeScale".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_flFadeScale".to_string(),
should_parse: true,
prop_id: 27101,
full_name: "CWorld.m_flFadeScale".to_string(),
}),
Value(ValueField {
decoder: NoscaleDecoder,
name: "m_flShadowStrength".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_flShadowStrength".to_string(),
should_parse: true,
prop_id: 27102,
full_name: "CWorld.m_flShadowStrength".to_string(),
}),
Value(ValueField {
decoder: UnsignedDecoder,
name: "m_nObjectCulling".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_nObjectCulling".to_string(),
should_parse: true,
prop_id: 27103,
full_name: "CWorld.m_nObjectCulling".to_string(),
}),
Value(ValueField {
decoder: SignedDecoder,
name: "m_nAddDecal".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_nAddDecal".to_string(),
should_parse: true,
prop_id: 27104,
full_name: "CWorld.m_nAddDecal".to_string(),
}),
Value(ValueField {
decoder: VectorNoscaleDecoder,
name: "m_vDecalPosition".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_vDecalPosition".to_string(),
should_parse: true,
prop_id: 27105,
full_name: "CWorld.m_vDecalPosition".to_string(),
}),
Value(ValueField {
decoder: VectorNoscaleDecoder,
name: "m_vDecalForwardAxis".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_vDecalForwardAxis".to_string(),
should_parse: true,
prop_id: 27106,
full_name: "CWorld.m_vDecalForwardAxis".to_string(),
}),
Value(ValueField {
decoder: NoscaleDecoder,
name: "m_flDecalHealBloodRate".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_flDecalHealBloodRate".to_string(),
should_parse: true,
prop_id: 27107,
full_name: "CWorld.m_flDecalHealBloodRate".to_string(),
}),
Value(ValueField {
decoder: NoscaleDecoder,
name: "m_flDecalHealHeightRate".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_flDecalHealHeightRate".to_string(),
should_parse: true,
prop_id: 27108,
full_name: "CWorld.m_flDecalHealHeightRate".to_string(),
}),
Vector(VectorField {
field_enum: Box::new(Value(ValueField {
decoder: UnsignedDecoder,
name: "m_ConfigEntitiesToPropagateMaterialDecalsTo".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_ConfigEntitiesToPropagateMaterialDecalsTo".to_string(),
should_parse: true,
prop_id: 27109,
full_name: "CWorld.m_ConfigEntitiesToPropagateMaterialDecalsTo".to_string(),
})),
decoder: UnsignedDecoder,
}),
@@ -1258,9 +1257,9 @@ mod tests {
field_enum: Box::new(Value(ValueField {
decoder: UnsignedDecoder,
name: "m_bvDisabledHitGroups".to_string(),
should_parse: false,
prop_id: 0,
full_name: "None m_bvDisabledHitGroups".to_string(),
should_parse: true,
prop_id: 27110,
full_name: "CWorld.m_bvDisabledHitGroups".to_string(),
})),
length: 1,
}),