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

cleanup instance baselines

This commit is contained in:
Robin Appelman 2022-04-07 20:43:41 +02:00
commit 5a0375c9c0

View file

@ -198,6 +198,8 @@ impl<'a> ParserState {
Message::PacketEntities(ent_message) => {
for removed in ent_message.removed_entities.iter() {
self.entity_classes.remove(removed);
self.instance_baselines[0].remove(removed);
self.instance_baselines[1].remove(removed);
}
for entity in ent_message.entities.iter() {
@ -233,6 +235,7 @@ impl<'a> ParserState {
if let (Some(extra), Ok(class_id)) = (&entry.extra_data, entry.text().parse()) {
let baseline = StaticBaseline::new(class_id, extra.data.to_owned());
self.static_baselines.insert(class_id, baseline);
self.parsed_static_baselines.borrow_mut().remove(&class_id);
}
}
}