mirror of
https://codeberg.org/demostf/parser.git
synced 2026-11-30 02:30:46 +01:00
formatting
This commit is contained in:
parent
f914f1b747
commit
471f89a155
3 changed files with 9 additions and 11 deletions
|
|
@ -1,6 +1,6 @@
|
|||
use crate::Stream;
|
||||
/// Messages that consists only of primitives and string and can be derived
|
||||
use crate::demo::data::{MaybeUtf8String, ServerTick};
|
||||
use crate::Stream;
|
||||
#[cfg(feature = "write")]
|
||||
use bitbuffer::BitWrite;
|
||||
use bitbuffer::{BitRead, LittleEndian};
|
||||
|
|
|
|||
|
|
@ -323,7 +323,8 @@ impl ParserState {
|
|||
|
||||
pub fn handle_string_entry(&mut self, table: &str, _index: usize, entry: &StringTableEntry) {
|
||||
if table == "instancebaseline"
|
||||
&& let (Some(extra), Ok(class_id)) = (&entry.extra_data, entry.text().parse()) {
|
||||
&& 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);
|
||||
|
|
@ -507,9 +508,6 @@ fn test_static_baseline_reencode() {
|
|||
assert_ne!(misread, props);
|
||||
}
|
||||
|
||||
let fixed = StaticBaseline::new(
|
||||
ClassId::from(0u16),
|
||||
baseline.reencode(&from, &to).unwrap(),
|
||||
);
|
||||
let fixed = StaticBaseline::new(ClassId::from(0u16), baseline.reencode(&from, &to).unwrap());
|
||||
assert_eq!(fixed.parse(&to).unwrap(), props);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -356,7 +356,7 @@ pub enum SendPropFlag {
|
|||
|
||||
impl SendPropFlags {
|
||||
pub fn with_non_networked_flags(self, name: &SendPropName) -> SendPropFlags {
|
||||
const AGAINST_TICKCOUNT_PROPS: &[&'static str] = &["m_flSimulationTime", "m_flAnimTime"];
|
||||
const AGAINST_TICKCOUNT_PROPS: &[&str] = &["m_flSimulationTime", "m_flAnimTime"];
|
||||
if AGAINST_TICKCOUNT_PROPS.contains(&name.as_str())
|
||||
&& self.contains(SendPropFlag::ChangesOften)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue