Skip to content

Commit

Permalink
Update bot parsing.
Browse files Browse the repository at this point in the history
  • Loading branch information
vikpe committed Jun 28, 2024
1 parent 9905192 commit 250fa57
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ categories = ["parsing"]
keywords = ["demos", "mvd", "parser", "quake", "quakeworld"]
repository = "https://github.com/vikpe/mvdparser"
authors = ["Viktor Persson <viktor.persson@arcsin.se>"]
version = "0.15.2"
version = "0.15.3"
edition = "2021"
license = "MIT"
include = [
Expand All @@ -22,7 +22,7 @@ include = [
anyhow = "1.0.82"
bstr = "1.9.1"
chrono = { version = "0.4.38", default-features = false }
ktxstats = "0.3.1"
ktxstats = "0.4.0"
quake_clientinfo = "0.3.0"
quake_serverinfo = "0.4.0"
quake_text = "0.2.0"
Expand Down
4 changes: 3 additions & 1 deletion src/player.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
use std::cmp::Ordering;

const BOT_PING: i32 = 10;

#[derive(Clone, Debug, Default, PartialEq)]
pub struct Player {
pub name: String,
Expand All @@ -25,7 +27,7 @@ impl From<&ktxstats::v3::Player> for Player {
color: [player.top_color as u8, player.bottom_color as u8],
frags: player.stats.frags,
ping: player.ping as u32,
is_bot: player.ping == 10,
is_bot: player.bot.is_some() || player.ping == BOT_PING,
auth_username,
auth_cc: None,
}
Expand Down

0 comments on commit 250fa57

Please sign in to comment.