Skip to content

Commit

Permalink
revert last (#168)
Browse files Browse the repository at this point in the history
  • Loading branch information
LaihoE authored May 24, 2024
1 parent a63395c commit 8d6da33
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/parser/src/second_pass/entities.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ impl<'a> SecondPassParser<'a> {
0b00 => EntityCmd::Update,
_ => return Err(DemoParserError::ImpossibleCmd),
};

match cmd {
EntityCmd::Delete => {
self.projectiles.remove(&entity_id);
Expand All @@ -120,6 +121,12 @@ impl<'a> SecondPassParser<'a> {
self.update_entity(&mut bitreader, entity_id, false, &mut events_to_emit, is_fullpacket)?;
}
EntityCmd::Update => {
if msg.has_pvs_vis_bits() > 0 {
// Most entities pass trough here. Seems like entities that are not updated.
if bitreader.read_nbits(2)? & 0x01 == 1 {
continue;
}
}
self.update_entity(&mut bitreader, entity_id, false, &mut events_to_emit, is_fullpacket)?;
}
}
Expand Down

0 comments on commit 8d6da33

Please sign in to comment.