Skip to content

Commit

Permalink
add missing ticks and non-player-props
Browse files Browse the repository at this point in the history
  • Loading branch information
LaihoE committed Aug 6, 2024
1 parent 0431dfc commit 165e177
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/parser/src/second_pass/game_events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,7 @@ impl<'a> SecondPassParser<'a> {
name: "tick".to_string(),
});
}
fields.extend(self.find_non_player_props());
let ge = GameEvent {
name: "server_cvar".to_string(),
fields: fields,
Expand Down Expand Up @@ -851,7 +852,6 @@ impl<'a> SecondPassParser<'a> {

let mut fields = vec![];
fields.extend(self.find_non_player_props());

fields.push(EventField {
data: Some(Variant::I32(self.tick)),
name: "tick".to_string(),
Expand Down Expand Up @@ -901,6 +901,11 @@ impl<'a> SecondPassParser<'a> {
data: Some(Variant::String(chat_msg.param2().to_owned())),
name: "chat_message".to_string(),
});
fields.push(EventField {
data: Some(Variant::I32(self.tick)),
name: "tick".to_string(),
});
fields.extend(self.find_non_player_props());
let ge = GameEvent {
name: "chat_message".to_string(),
fields: fields,
Expand All @@ -927,6 +932,7 @@ impl<'a> SecondPassParser<'a> {
data: Some(Variant::I32(self.tick)),
name: "tick".to_string(),
});
fields.extend(self.find_non_player_props());
let ge = GameEvent {
name: "server_message".to_string(),
fields: fields,
Expand All @@ -951,6 +957,7 @@ impl<'a> SecondPassParser<'a> {
data: Some(Variant::I32(self.tick)),
name: "tick".to_string(),
});
fields.extend(self.find_non_player_props());
let ge = GameEvent {
name: "round_start".to_string(),
fields: fields,
Expand Down Expand Up @@ -1002,6 +1009,11 @@ impl<'a> SecondPassParser<'a> {
data: Some(Variant::I32(update.rank_type_id())),
name: "rank_type_id".to_string(),
});
fields.push(EventField {
data: Some(Variant::I32(self.tick)),
name: "tick".to_string(),
});
fields.extend(self.find_non_player_props());
let ge = GameEvent {
name: "rank_update".to_string(),
fields: fields,
Expand Down

0 comments on commit 165e177

Please sign in to comment.