1
0
Fork 0
mirror of https://codeberg.org/demostf/parser.git synced 2026-06-03 10:14:06 +02:00

rework baseline prop handling

This commit is contained in:
Robin Appelman 2022-08-06 01:20:26 +02:00
commit bae9acdd92
9 changed files with 135 additions and 105 deletions

View file

@ -52,6 +52,7 @@ impl EntityDump {
tick: u32,
classes: &[ServerClass],
prop_names: &FnvHashMap<SendPropIdentifier, (SendTableName, SendPropName)>,
state: &ParserState,
) -> Self {
EntityDump {
tick,
@ -59,7 +60,7 @@ impl EntityDump {
id: entity.entity_index,
pvs: entity.update_type.into(),
props: entity
.into_props()
.props(state)
.map(|prop| {
let (table_name, prop_name) = &prop_names[&prop.identifier];
(format!("{}.{}", table_name, prop_name), prop.value)
@ -126,7 +127,7 @@ impl MessageHandler for EntityDumper {
self.entities
.into_iter()
.map(|(tick, entity)| {
EntityDump::from_entity(entity, tick, &state.server_classes, &prop_names)
EntityDump::from_entity(entity, tick, &state.server_classes, &prop_names, state)
})
.collect()
}