1
0
Fork 0
mirror of https://codeberg.org/demostf/parser.git synced 2026-06-04 02:24:12 +02:00

more state updates

This commit is contained in:
Robin Appelman 2019-03-02 22:29:02 +01:00
commit 8183ac5b65
4 changed files with 57 additions and 15 deletions

View file

@ -5,24 +5,24 @@ use crate::{Parse, ParseError, ParserState, Result, Stream};
#[derive(BitRead, Debug)]
pub struct ServerClass {
id: u16,
name: String,
data_table: String,
pub id: u16,
pub name: String,
pub data_table: String,
}
#[derive(Debug)]
pub struct SendTable {
name: String,
props: Vec<SendPropDefinition>,
needs_decoder: bool,
flattened_props: Option<Vec<SendPropDefinition>>,
pub name: String,
pub props: Vec<SendPropDefinition>,
pub needs_decoder: bool,
pub flattened_props: Option<Vec<SendPropDefinition>>,
}
#[derive(Debug)]
pub struct DataTablePacket {
tick: u32,
tables: Vec<SendTable>,
server_classes: Vec<ServerClass>,
pub tick: u32,
pub tables: Vec<SendTable>,
pub server_classes: Vec<ServerClass>,
}
impl Parse for DataTablePacket {

View file

@ -87,8 +87,8 @@ impl fmt::Debug for StringTableEntry {
#[derive(Debug)]
pub struct StringTablePacket {
tick: u32,
tables: Vec<StringTable>,
pub tick: u32,
pub tables: Vec<StringTable>,
}
impl Parse for StringTablePacket {

View file

@ -2,5 +2,5 @@ use bitstream_reader::BitRead;
#[derive(BitRead, Debug)]
pub struct SyncTickPacket {
tick: u32,
pub tick: u32,
}