From 1818c572f176ef22e64ec1a743d698a321eee57f Mon Sep 17 00:00:00 2001 From: ryantaylor <2320507+ryantaylor@users.noreply.github.com> Date: Mon, 3 Jun 2024 19:27:20 -0400 Subject: [PATCH] Add player ID bitmask for weird IDs. --- Cargo.toml | 2 +- README.md | 4 ++-- src/data/ticks/command.rs | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 53e2f89..d9463f4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "vault" -version = "9.0.0" +version = "9.0.1" edition = "2021" authors = ["Ryan Taylor <2320507+ryantaylor@users.noreply.github.com>"] diff --git a/README.md b/README.md index f370218..385fc65 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # vault -[![crates.io](https://img.shields.io/crates/v/vault.svg)](https://crates.io/crates/vault) [![Documentation](https://img.shields.io/badge/View-Documentation-blue.svg)](https://docs.rs/vault/9.0.0/vault/) +[![crates.io](https://img.shields.io/crates/v/vault.svg)](https://crates.io/crates/vault) [![Documentation](https://img.shields.io/badge/View-Documentation-blue.svg)](https://docs.rs/vault/9.0.1/vault/) `vault` is a Company of Heroes replay parsing library written in [Rust](https://www.rust-lang.org/). It has been completely rewritten for Company of Heroes 3 to provide a more intuitive interface while simplifying the code and leveraging [nom](https://github.com/rust-bakery/nom)'s parser combinators to enable clean, fast parsing of Company of Heroes 3 replay files. @@ -112,7 +112,7 @@ Ruby bindings have some additional compatibility requirements, such as `libclang # Documentation -Documentation for `vault` [can be viewed online](https://docs.rs/vault/9.0.0/vault/). +Documentation for `vault` [can be viewed online](https://docs.rs/vault/9.0.1/vault/). Alternatively, you can easily build an offline copy of the documentation for yourself with `cargo`: diff --git a/src/data/ticks/command.rs b/src/data/ticks/command.rs index 7b71ad3..fe18ebe 100644 --- a/src/data/ticks/command.rs +++ b/src/data/ticks/command.rs @@ -96,7 +96,7 @@ impl Command { tuple((le_u8, CommandData::parser_for_type(action_type))), |(player_id, data)| Command { action_type, - player_id, + player_id: player_id & 0b0111_1111, // bit mask to turn eg 0x87 into 0x7 data, }, )(input) @@ -116,7 +116,7 @@ impl Command { )), |((bytes, _), player_id, data)| Command { action_type, - player_id, + player_id: player_id & 0b0111_1111, // bit mask to turn eg 0x87 into 0x7, data, bytes, },