From 6a1f013df203ea3eee83965799cc3c95f394fccd Mon Sep 17 00:00:00 2001 From: Christian Semmler Date: Fri, 6 Jun 2025 18:02:06 -0700 Subject: [PATCH] Fix `LegoUnknown::FUN_1009a1e0` (#250) --- LEGO1/lego/sources/misc/legounknown.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/LEGO1/lego/sources/misc/legounknown.cpp b/LEGO1/lego/sources/misc/legounknown.cpp index afc22e8f..10789eb6 100644 --- a/LEGO1/lego/sources/misc/legounknown.cpp +++ b/LEGO1/lego/sources/misc/legounknown.cpp @@ -2,6 +2,8 @@ #include "mxgeometry/mxmatrix.h" +#include + DECOMP_SIZE_ASSERT(LegoUnknown, 0x50) // FUNCTION: LEGO1 0x1009a0f0 @@ -44,7 +46,7 @@ LegoResult LegoUnknown::FUN_1009a1e0(float p_f1, Matrix4& p_mat, Vector3& p_v, L Vector3 v3(p_mat[1]); Vector3 v4(p_mat[2]); - if (p_f1 <= 0.001) { + if (isnan(p_f1) || p_f1 <= 0.001) { v1 = m_unk0x00[0]; v4 = m_unk0x00[1]; }