mindustry logic execution, map- and schematic- parsing and rendering
fix bomb deser
bendn 2023-08-26
parent 7617d2f · commit d981b46
-rw-r--r--Cargo.toml2
-rw-r--r--src/unit/mod.rs3
2 files changed, 4 insertions, 1 deletions
diff --git a/Cargo.toml b/Cargo.toml
index 7166acf..9b84597 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "mindus"
-version = "4.0.10"
+version = "4.0.11"
edition = "2021"
description = "A library for working with mindustry data formats (eg schematics and maps) (fork of plandustry)"
authors = [
diff --git a/src/unit/mod.rs b/src/unit/mod.rs
index c7d66bf..af32c5c 100644
--- a/src/unit/mod.rs
+++ b/src/unit/mod.rs
@@ -251,6 +251,9 @@ impl UnitClass {
state.stack = read_stack(buff)?;
state.status = read_status(buff)?;
state.team = Team::of(buff.read_u8()?);
+ if self == Self::Bomb {
+ buff.skip(4)?; // time
+ }
let ty = Type::try_from(buff.read_u16()?).unwrap();
buff.skip(1)?; // update_building
state.velocity = (buff.read_f32()?, buff.read_f32()?);