mirror of
https://codeberg.org/demostf/parser.git
synced 2026-06-03 18:24:05 +02:00
handle _condition_bits
This commit is contained in:
parent
9adbe3bc6d
commit
306362d36e
3 changed files with 5 additions and 3 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
|
@ -1149,7 +1149,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tf-demo-parser"
|
name = "tf-demo-parser"
|
||||||
version = "0.6.2"
|
version = "0.6.3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"Inflector",
|
"Inflector",
|
||||||
"better-panic",
|
"better-panic",
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
[package]
|
[package]
|
||||||
name = "tf-demo-parser"
|
name = "tf-demo-parser"
|
||||||
description = "parser for tf2 demo files"
|
description = "parser for tf2 demo files"
|
||||||
version = "0.6.2"
|
version = "0.6.3"
|
||||||
authors = ["Robin Appelman <robin@icewind.nl>"]
|
authors = ["Robin Appelman <robin@icewind.nl>"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MIT OR Apache-2.0"
|
license = "MIT OR Apache-2.0"
|
||||||
|
|
|
||||||
|
|
@ -245,6 +245,8 @@ impl GameStateAnalyser {
|
||||||
SendPropIdentifier::new("DT_TFPlayerShared", "m_nPlayerCondEx3");
|
SendPropIdentifier::new("DT_TFPlayerShared", "m_nPlayerCondEx3");
|
||||||
const PLAYER_COND_EX4: SendPropIdentifier =
|
const PLAYER_COND_EX4: SendPropIdentifier =
|
||||||
SendPropIdentifier::new("DT_TFPlayerShared", "m_nPlayerCondEx4");
|
SendPropIdentifier::new("DT_TFPlayerShared", "m_nPlayerCondEx4");
|
||||||
|
const PLAYER_COND_BITS: SendPropIdentifier =
|
||||||
|
SendPropIdentifier::new("DT_TFPlayerConditionListExclusive", "_condition_bits");
|
||||||
|
|
||||||
const WEAPON_0: SendPropIdentifier = SendPropIdentifier::new("m_hMyWeapons", "000");
|
const WEAPON_0: SendPropIdentifier = SendPropIdentifier::new("m_hMyWeapons", "000");
|
||||||
const WEAPON_1: SendPropIdentifier = SendPropIdentifier::new("m_hMyWeapons", "001");
|
const WEAPON_1: SendPropIdentifier = SendPropIdentifier::new("m_hMyWeapons", "001");
|
||||||
|
|
@ -296,7 +298,7 @@ impl GameStateAnalyser {
|
||||||
let handle = Handle(i64::try_from(&prop.value).unwrap_or_default());
|
let handle = Handle(i64::try_from(&prop.value).unwrap_or_default());
|
||||||
player.weapons[2] = handle;
|
player.weapons[2] = handle;
|
||||||
}
|
}
|
||||||
PLAYER_COND => {
|
PLAYER_COND | PLAYER_COND_BITS => {
|
||||||
player.conditions[0..4].copy_from_slice(
|
player.conditions[0..4].copy_from_slice(
|
||||||
&i64::try_from(&prop.value).unwrap_or_default().to_le_bytes()[0..4],
|
&i64::try_from(&prop.value).unwrap_or_default().to_le_bytes()[0..4],
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue