Skip to content

Commit df3ce19

Browse files
committed
Match and link CCollidableAABox
1 parent 9c787ee commit df3ce19

3 files changed

Lines changed: 4 additions & 7 deletions

File tree

config/GM8E01_01/symbols.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18697,7 +18697,7 @@ lbl_803ECB98 = .data:0x803ECB98; // type:object size:0x58
1869718697
lbl_803ECBF0 = .data:0x803ECBF0; // type:object size:0x40
1869818698
__vt__16CAuiEnergyBarT01 = .data:0x803ECC30; // type:object size:0x3C
1869918699
lbl_803ECC70 = .data:0x803ECC70; // type:object size:0x40
18700-
lbl_803ECCB0 = .data:0x803ECCB0; // type:object size:0x28
18700+
__vt__16CCollidableAABox = .data:0x803ECCB0; // type:object size:0x28
1870118701
lbl_803ECCD8 = .data:0x803ECCD8; // type:object size:0x28
1870218702
jumptable_803ECD00 = .data:0x803ECD00; // type:object size:0xAC scope:local
1870318703
lbl_803ECDB0 = .data:0x803ECDB0; // type:object size:0x10

configure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1253,7 +1253,7 @@ def MatchingFor(*versions):
12531253
"Collision",
12541254
"core",
12551255
[
1256-
Object(NonMatching, "Collision/CCollidableAABox.cpp"),
1256+
Object(MatchingFor("GM8E01_00", "GM8E01_01"), "Collision/CCollidableAABox.cpp"),
12571257
Object(
12581258
MatchingFor("GM8E01_00", "GM8E01_01"),
12591259
"Collision/CCollidableCollisionSurface.cpp",

src/Collision/CCollidableAABox.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,13 +108,10 @@ CRayCastResult CCollidableAABox::CastRayInternal(const CInternalRayCastStructure
108108
const float signValue = sign ? 1.f : -1.f;
109109
CVector3f planeNormal = CVector3f::Zero();
110110
planeNormal[axis] = signValue;
111-
float normalX = planeNormal.GetX();
112-
float normalY = planeNormal.GetY();
113-
float normalZ = planeNormal.GetZ();
111+
const CUnitVector3f vec(planeNormal.GetX(), planeNormal.GetY(), planeNormal.GetZ());
114112
const float planeD = axis != 0 ? GetBox().GetMinPoint()[axis] : -GetBox().GetMaxPoint()[axis];
115113
const CMaterialList& list = GetMaterial();
116-
CRayCastResult result(tMin, localRayStart + tMin * localRayDir,
117-
CPlane(planeD, CUnitVector3f(normalX, normalY, normalZ)), list);
114+
CRayCastResult result(tMin, localRayStart + tMin * localRayDir, CPlane(planeD, vec), list);
118115
result.Transform(rayCastXf);
119116
return result;
120117
}

0 commit comments

Comments
 (0)