From d4008b1a9fc72c73ad46dee19bc50a280025de92 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Sat, 24 Oct 2026 10:48:20 -0400 Subject: [PATCH] Read prop light color as floats and registry as signed ArcPropInfo_ctorFromStream (sb.exe 0x680360) loads LIGHT_COLOR as four floats (0x6BB2A0) and REGISTRY with ResStream_ReadInt32, reading the registry name only when it is greater than zero. Co-Authored-By: Claude Opus 5.5 --- mbEditorPro2.0/arcane/zones/ArcProp.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/mbEditorPro2.0/arcane/zones/ArcProp.py b/mbEditorPro2.0/arcane/zones/ArcProp.py index d6d8ad9..6be1972 100644 --- a/mbEditorPro2.0/arcane/zones/ArcProp.py +++ b/mbEditorPro2.0/arcane/zones/ArcProp.py @@ -25,7 +25,7 @@ class ArcPropInfo: self.prop_platform_height = stream.read_float() self.prop_is_light_data = stream.read_bool() if self.prop_is_light_data: - self.prop_light_color = [stream.read_dword() for _ in range(4)] + self.prop_light_color = [stream.read_float() for _ in range(4)] self.prop_light_radius = stream.read_float() self.prop_light_flicker = stream.read_dword() self.prop_light_cube_map = stream.read_dword() @@ -39,8 +39,8 @@ class ArcPropInfo: mobile.load_binary(stream) num_descriptors = stream.read_dword() self.prop_descriptors = [stream.read_string() for _ in range(num_descriptors)] - self.prop_registry = stream.read_dword() - if self.prop_registry: + self.prop_registry = stream.read_long() + if self.prop_registry > 0: self.prop_registry_name = stream.read_string() self.prop_has_zone_event = stream.read_bool() self.prop_has_teleporter = stream.read_bool() @@ -58,7 +58,7 @@ class ArcPropInfo: stream.write_bool(self.prop_is_light_data) if self.prop_is_light_data: for i in range(4): - stream.write_dword(self.prop_light_color[i]) + stream.write_float(self.prop_light_color[i]) stream.write_float(self.prop_light_radius) stream.write_dword(self.prop_light_flicker) stream.write_dword(self.prop_light_cube_map) @@ -75,8 +75,8 @@ class ArcPropInfo: for descriptor in self.prop_descriptors: stream.write_string(descriptor) - stream.write_dword(self.prop_registry) - if self.prop_registry: + stream.write_long(self.prop_registry) + if self.prop_registry > 0: stream.write_string(self.prop_registry_name) stream.write_bool(self.prop_has_zone_event) @@ -106,7 +106,7 @@ class ArcPropInfo: data['prop_content_mobiles'].append(mobile.save_json()) data['prop_descriptors'] = self.prop_descriptors data['prop_registry'] = self.prop_registry - if self.prop_registry: + if self.prop_registry > 0: data['prop_registry_name'] = self.prop_registry_name data['prop_has_zone_event'] = self.prop_has_zone_event data['prop_has_teleporter'] = self.prop_has_teleporter @@ -139,7 +139,7 @@ class ArcPropInfo: self.prop_content_mobiles.append(mobile) self.prop_descriptors = data['prop_descriptors'] self.prop_registry = data['prop_registry'] - if self.prop_registry: + if self.prop_registry > 0: self.prop_registry_name = data['prop_registry_name'] self.prop_has_zone_event = data['prop_has_zone_event'] self.prop_has_teleporter = data['prop_has_teleporter']