Skip to content

Commit

Permalink
polycollection2d fix
Browse files Browse the repository at this point in the history
- im stupid, turns out it's a vec3 for the vPos's offset and it also
  applies to POLYCOLLECTION2D and presumably CIRCLE as well...
  • Loading branch information
steven11sjf committed Mar 14, 2024
1 parent cd5bea6 commit 8498d8d
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions src/mercury_engine_data_structures/formats/collision.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from construct import Array, Flag, Hex, IfThenElse, Int16ul, Rebuild, Struct

from mercury_engine_data_structures import game_check
from mercury_engine_data_structures.common_types import CVector2D, Float, UInt, make_vector
from mercury_engine_data_structures.common_types import CVector2D, CVector3D, Float, UInt, make_vector
from mercury_engine_data_structures.construct_extensions.misc import OptionalValue
from mercury_engine_data_structures.game_check import Game

Expand Down Expand Up @@ -38,14 +38,11 @@

collision_formats = {
"AABOX2D": Struct(
center=CVector2D,
unk=Float,
offset=CVector3D,
size=CVector2D,
),
"CIRCLE": Struct(
value1=Float,
value2=Float,
value3=Float,
offset=CVector3D,
size=Float,
),
"CAPSULE2D": Struct(
Expand All @@ -56,9 +53,7 @@
value5=Float,
),
"POLYCOLLECTION2D": Struct(
unknown1=UInt,
unknown2=UInt,
unknown3=UInt,
offset=CVector3D,
polys=make_vector(CollisionPoly),
total_boundings=Array(4, Float),
binary_search_trees=OptionalValue(make_vector(BinarySearchTree)),
Expand Down

0 comments on commit 8498d8d

Please sign in to comment.