From 2f2931ae4f8c156c69d6071cd65188ea48685474 Mon Sep 17 00:00:00 2001 From: Calle Svensson Date: Fri, 27 Sep 2024 21:00:03 +0200 Subject: [PATCH] Change the zero const to a signed integer in the de/player struct In some replays, the value has been observed to be "-1" as opposed to "0" --- mgz/header/de.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mgz/header/de.py b/mgz/header/de.py index 9f00ba1..8ee8020 100644 --- a/mgz/header/de.py +++ b/mgz/header/de.py @@ -28,14 +28,14 @@ "dat_crc"/Bytes(8), "mp_game_version"/Byte, "civ_id"/Int32ul, - "unk"/If(lambda ctx: find_save_version(ctx) >= 61.5, Int32ul), + "unk1"/If(lambda ctx: find_save_version(ctx) >= 61.5, Int32ul), "ai_type"/de_string, "ai_civ_name_index"/Byte, "ai_name"/de_string, "name"/de_string, "type"/PlayerTypeEnum(Int32ul), "profile_id"/Int32ul, - Const(b"\x00\x00\x00\x00"), + "unk2" / Int32sl, "player_number"/Int32sl, "hd_rm_elo"/If(lambda ctx: find_save_version(ctx) < 25.22, Int32ul), "hd_dm_elo"/If(lambda ctx: find_save_version(ctx) < 25.22, Int32ul),