mirror of
https://codeberg.org/demostf/parser.git
synced 2026-06-03 10:14:06 +02:00
Merge pull request #14 from Tomeno/player_ping
Add ping to Player struct
This commit is contained in:
commit
fd56f9e3dd
3 changed files with 17 additions and 0 deletions
|
|
@ -55,6 +55,7 @@ pub struct Player {
|
|||
pub info: Option<UserInfo>,
|
||||
pub charge: u8,
|
||||
pub simtime: u16,
|
||||
pub ping: u16,
|
||||
pub in_pvs: bool,
|
||||
}
|
||||
|
||||
|
|
@ -440,6 +441,9 @@ impl GameStateAnalyser {
|
|||
"m_iChargeLevel" => {
|
||||
player.charge = i64::try_from(&prop.value).unwrap_or_default() as u8
|
||||
}
|
||||
"m_iPing" => {
|
||||
player.ping = i64::try_from(&prop.value).unwrap_or_default() as u16
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue