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:
parent
74ad7d121f
commit
bae9acdd92
9 changed files with 135 additions and 105 deletions
|
|
@ -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()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue