From 71d886a784e5f20742b31f029c7ef3de027de5e3 Mon Sep 17 00:00:00 2001 From: Jared Ketterer <36507175+snake-biscuits@users.noreply.github.com> Date: Tue, 4 Jul 2023 16:29:40 +1000 Subject: [PATCH] (#112) fixing `DisplacementInfo` `LumpClasses` --- bsp_tool/branches/nexon/vindictus69.py | 2 +- bsp_tool/branches/strata/strata.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/bsp_tool/branches/nexon/vindictus69.py b/bsp_tool/branches/nexon/vindictus69.py index 84bb6324..489cb2df 100644 --- a/bsp_tool/branches/nexon/vindictus69.py +++ b/bsp_tool/branches/nexon/vindictus69.py @@ -146,7 +146,7 @@ class DisplacementInfo(source.DisplacementInfo): # LUMP 26 "power", "smoothing_angle", "unknown", "contents", "face", "lightmap_alpha_start", "lightmap_sample_position_start", "edge_neighbours", "corner_neighbours", "allowed_vertices"] - _format = "3f3if2iI2i144c10I" # Neighbours are also different + _format = "3f3if2iI2i144B10I" # Neighbours are also different # TODO: replace 44c w/ f"{DisplacementNeighbour._format}" * 4 _arrays = {"start_position": [*"xyz"], "edge_neighbours": 72, "corner_neighbours": 72, "allowed_vertices": 10} diff --git a/bsp_tool/branches/strata/strata.py b/bsp_tool/branches/strata/strata.py index fa3fc7df..94e9012d 100644 --- a/bsp_tool/branches/strata/strata.py +++ b/bsp_tool/branches/strata/strata.py @@ -194,7 +194,8 @@ class DisplacementInfo(base.Struct): # LUMP 26 "first_lightmap_alpha", "first_lightmap_sample_position", "edge_neighbours", "corner_neighbours", "allowed_vertices"] _format = "3f4ifiI2i144B10I" - _arrays = {"edge_neighbours": 72, "corner_neighbours": 72, "allowed_vertices": 10} + _arrays = {"start_position": [*"xyz"], "edge_neighbours": 72, "corner_neighbours": 72, + "allowed_vertices": 10} # 4x DisplacementNeighbour: edge_neighbours # 4x DisplacementCornerNeighbours: corner_neighbours _classes = {"start_position": vector.vec3, "contents": source.Contents}