1
0
Fork 0
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:
Robin Appelman 2023-10-17 22:30:06 +02:00 committed by GitHub
commit fd56f9e3dd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 0 deletions

View file

@ -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
}
_ => {}
}
}