mirror of
https://codeberg.org/demostf/parser.git
synced 2026-06-03 18:24:05 +02:00
improved user info handling
This commit is contained in:
parent
38cdb3a59b
commit
1eb6c06ac3
7 changed files with 14 additions and 11 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -359,17 +359,20 @@ impl Analyser {
|
||||||
.unwrap_or_else(|| Ok((user_id.0 as u32).into()))
|
.unwrap_or_else(|| Ok((user_id.0 as u32).into()))
|
||||||
{
|
{
|
||||||
Ok(entity_id) if !steam_id.is_empty() => {
|
Ok(entity_id) if !steam_id.is_empty() => {
|
||||||
self.state.users.insert(
|
self.state
|
||||||
user_id,
|
.users
|
||||||
UserInfo {
|
.entry(user_id)
|
||||||
|
.and_modify(|info| {
|
||||||
|
info.entity_id = entity_id;
|
||||||
|
})
|
||||||
|
.or_insert_with(|| UserInfo {
|
||||||
classes: ClassList::default(),
|
classes: ClassList::default(),
|
||||||
team: Team::Other,
|
team: Team::Other,
|
||||||
steam_id,
|
steam_id,
|
||||||
user_id,
|
user_id,
|
||||||
name,
|
name,
|
||||||
entity_id,
|
entity_id,
|
||||||
},
|
});
|
||||||
);
|
|
||||||
}
|
}
|
||||||
_ => {}
|
_ => {}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue