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

@@ -9,6 +9,8 @@ mod propcontroller;
mod sendtables; mod sendtables;
mod variant; mod variant;
pub use entities::EntityFilter;
#[derive(Debug)] #[derive(Debug)]
pub enum FirstPassError { pub enum FirstPassError {
DecompressFrame, DecompressFrame,
@@ -76,7 +78,7 @@ pub struct Class {
serializer: sendtables::Serializer, serializer: sendtables::Serializer,
} }
pub fn parse<'b, FI>(frames: FI) -> Result<FirstPassOutput, FirstPassError> pub fn parse<'b, FI>(frames: FI, filter: EntityFilter) -> Result<FirstPassOutput, FirstPassError>
where where
FI: IntoIterator<Item = Frame<'b>>, FI: IntoIterator<Item = Frame<'b>>,
{ {
@@ -91,6 +93,7 @@ where
let mut entity_ctx = entities::EntityContext { let mut entity_ctx = entities::EntityContext {
entities: std::collections::HashMap::new(), entities: std::collections::HashMap::new(),
cls_to_class: std::collections::HashMap::new(), cls_to_class: std::collections::HashMap::new(),
filter,
}; };
let mut paths = Paths::new(); let mut paths = Paths::new();
let mut qf_mapper = decoder::QfMapper { let mut qf_mapper = decoder::QfMapper {
@@ -130,7 +133,7 @@ where
&mut qf_mapper, &mut qf_mapper,
&mut baselines, &mut baselines,
&prop_controller, &prop_controller,
&mut entity_states &mut entity_states,
)?; )?;
} }
DemoCommand::FullPacket => { DemoCommand::FullPacket => {
@@ -144,7 +147,7 @@ where
&mut qf_mapper, &mut qf_mapper,
&mut baselines, &mut baselines,
&prop_controller, &prop_controller,
&mut entity_states &mut entity_states,
)?; )?;
} }
// TODO // TODO
@@ -231,7 +234,7 @@ fn parse_fullpacket(
qf_mapper: &mut decoder::QfMapper, qf_mapper: &mut decoder::QfMapper,
baselines: &mut std::collections::HashMap<u32, Vec<u8>>, baselines: &mut std::collections::HashMap<u32, Vec<u8>>,
prop_controller: &propcontroller::PropController, prop_controller: &propcontroller::PropController,
entity_states: &mut Vec<entities::EntityState> entity_states: &mut Vec<entities::EntityState>,
) -> Result<(), FirstPassError> { ) -> Result<(), FirstPassError> {
let raw: crate::csgo_proto::CDemoFullPacket = prost::Message::decode(data)?; let raw: crate::csgo_proto::CDemoFullPacket = prost::Message::decode(data)?;
@@ -253,7 +256,7 @@ fn parse_fullpacket(
qf_mapper, qf_mapper,
baselines, baselines,
prop_controller, prop_controller,
entity_states entity_states,
)?; )?;
Ok(()) Ok(())
@@ -272,7 +275,7 @@ fn parse_packet(
qf_mapper: &mut decoder::QfMapper, qf_mapper: &mut decoder::QfMapper,
baselines: &mut std::collections::HashMap<u32, Vec<u8>>, baselines: &mut std::collections::HashMap<u32, Vec<u8>>,
prop_controller: &propcontroller::PropController, prop_controller: &propcontroller::PropController,
entity_states: &mut Vec<entities::EntityState> entity_states: &mut Vec<entities::EntityState>,
) -> Result<(), FirstPassError> { ) -> Result<(), FirstPassError> {
let raw: crate::csgo_proto::CDemoPacket = prost::Message::decode(data)?; let raw: crate::csgo_proto::CDemoPacket = prost::Message::decode(data)?;
@@ -286,7 +289,7 @@ fn parse_packet(
qf_mapper, qf_mapper,
baselines, baselines,
prop_controller, prop_controller,
entity_states entity_states,
)?; )?;
Ok(()) Ok(())
@@ -302,7 +305,7 @@ fn inner_parse_packet(
qf_mapper: &mut decoder::QfMapper, qf_mapper: &mut decoder::QfMapper,
baselines: &mut std::collections::HashMap<u32, Vec<u8>>, baselines: &mut std::collections::HashMap<u32, Vec<u8>>,
prop_controller: &propcontroller::PropController, prop_controller: &propcontroller::PropController,
entity_states: &mut Vec<entities::EntityState> entity_states: &mut Vec<entities::EntityState>,
) -> Result<(), FirstPassError> { ) -> Result<(), FirstPassError> {
let mut bitreader = crate::bitreader::Bitreader::new(raw.data()); let mut bitreader = crate::bitreader::Bitreader::new(raw.data());
@@ -360,6 +363,7 @@ fn inner_parse_packet(
let raw: crate::csgo_proto::CsvcMsgPacketEntities = let raw: crate::csgo_proto::CsvcMsgPacketEntities =
prost::Message::decode(msg_bytes.as_slice())?; prost::Message::decode(msg_bytes.as_slice())?;
if entity_ctx.filter.enabled {
let mut bitreader = crate::bitreader::Bitreader::new(raw.entity_data()); let mut bitreader = crate::bitreader::Bitreader::new(raw.entity_data());
let mut entity_id: i32 = -1; let mut entity_id: i32 = -1;
for _ in 0..raw.updated_entries() { for _ in 0..raw.updated_entries() {
@@ -392,8 +396,10 @@ fn inner_parse_packet(
qf_mapper, qf_mapper,
prop_controller, prop_controller,
)?; )?;
if let Some(state) = state {
entity_states.push(state); entity_states.push(state);
} }
}
0b00 => { 0b00 => {
if raw.has_pvs_vis_bits() > 0 { if raw.has_pvs_vis_bits() > 0 {
if bitreader.read_nbits(2)? & 0x01 == 1 { if bitreader.read_nbits(2)? & 0x01 == 1 {
@@ -409,14 +415,17 @@ fn inner_parse_packet(
qf_mapper, qf_mapper,
prop_controller, prop_controller,
)?; )?;
if let Some(state) = state {
entity_states.push(state); entity_states.push(state);
} }
}
unknown => { unknown => {
panic!("{:?}", unknown); panic!("{:?}", unknown);
} }
}; };
} }
} }
}
crate::netmessagetypes::NetmessageType::svc_UserCmds => {} crate::netmessagetypes::NetmessageType::svc_UserCmds => {}
crate::netmessagetypes::NetmessageType::GE_SosStartSoundEvent => {} crate::netmessagetypes::NetmessageType::GE_SosStartSoundEvent => {}
crate::netmessagetypes::NetmessageType::GE_SosStopSoundEvent => {} crate::netmessagetypes::NetmessageType::GE_SosStopSoundEvent => {}
@@ -506,23 +515,26 @@ fn update_entity(
paths: &mut Paths, paths: &mut Paths,
qf_mapper: &mut decoder::QfMapper, qf_mapper: &mut decoder::QfMapper,
prop_controller: &propcontroller::PropController, prop_controller: &propcontroller::PropController,
) -> Result<entities::EntityState, FirstPassError> { ) -> Result<Option<entities::EntityState>, FirstPassError> {
let n_updates = fieldpath::parse_paths(bitreader, paths)?; let n_updates = fieldpath::parse_paths(bitreader, paths)?;
let (n_updated_values, entity_state) = entity_ctx.decode_entity_update( let (n_updated_values, entity_state) = match entity_ctx.decode_entity_update(
entity_id, entity_id,
bitreader, bitreader,
n_updates, n_updates,
paths, paths,
qf_mapper, qf_mapper,
prop_controller, prop_controller,
)?; )? {
Some(s) => s,
None => return Ok(None),
};
if n_updated_values > 0 { if n_updated_values > 0 {
// TODO // TODO
// Gather extra information // Gather extra information
// gather_extra_info(entity_id, prop_controller)?; // gather_extra_info(entity_id, prop_controller)?;
} }
Ok(entity_state) Ok(Some(entity_state))
} }
static HUFFMAN_LOOKUP_TABLE: std::sync::LazyLock<Vec<(u8, u8)>> = std::sync::LazyLock::new(|| { static HUFFMAN_LOOKUP_TABLE: std::sync::LazyLock<Vec<(u8, u8)>> = std::sync::LazyLock::new(|| {

View File

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

View File

@@ -103,7 +103,11 @@ 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::*; use ops::*;
match symbol { match symbol {

View File

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

View File

@@ -9,7 +9,11 @@ fn mirage_1() {
let frame_iter = csdemo::FrameIterator::parse(container.inner); let frame_iter = csdemo::FrameIterator::parse(container.inner);
assert_eq!(123333, frame_iter.count()); assert_eq!(123333, frame_iter.count());
let output = csdemo::parser::parse(csdemo::FrameIterator::parse(container.inner)).unwrap(); let output = csdemo::parser::parse(
csdemo::FrameIterator::parse(container.inner),
csdemo::parser::EntityFilter::disabled(),
)
.unwrap();
assert_eq!("de_mirage", output.header.map_name()); assert_eq!("de_mirage", output.header.map_name());
@@ -47,7 +51,11 @@ fn ancient_1() {
let frame_iter = csdemo::FrameIterator::parse(container.inner); let frame_iter = csdemo::FrameIterator::parse(container.inner);
assert_eq!(116676, frame_iter.count()); assert_eq!(116676, frame_iter.count());
let output = csdemo::parser::parse(csdemo::FrameIterator::parse(container.inner)).unwrap(); let output = csdemo::parser::parse(
csdemo::FrameIterator::parse(container.inner),
csdemo::parser::EntityFilter::disabled(),
)
.unwrap();
assert_eq!("de_ancient", output.header.map_name()); assert_eq!("de_ancient", output.header.map_name());