From c02214748b290c97c7c5a439df126e0f89d77bc6 Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Mon, 2 May 2022 14:14:07 +0200 Subject: [PATCH] Small bsplib improvement --- r5dev/bsplib/bsplib.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/r5dev/bsplib/bsplib.cpp b/r5dev/bsplib/bsplib.cpp index a058429f..bb4d9e1b 100644 --- a/r5dev/bsplib/bsplib.cpp +++ b/r5dev/bsplib/bsplib.cpp @@ -223,7 +223,7 @@ __int64 __fastcall BuildPropStaticFrustumCullMap(__int64 a1, __int64 a2, unsigne } v44 = fmaxf(v41, 100.0f); *(float*)(a1 + 16) = v44 * v44; - v45 = _mm_loadu_si32(&v84->gatherSize); + v45 = _mm_castps_si128(_mm_load_ss(&v84->gatherSize)); if (*(float*)v45.m128i_i32 <= 0.0f) { LOWORD(v48) = 0; @@ -237,7 +237,7 @@ __int64 __fastcall BuildPropStaticFrustumCullMap(__int64 a1, __int64 a2, unsigne *(float*)v47.m128i_i32 = fminf(*(float*)v46.m128i_i32, 4293918700.0f); v48 = (unsigned int)(_mm_cvtsi128_si32(v47) - 1065351168) >> 12; } - *(_WORD*)(a1 + 6) = v48; + *(_WORD*)(a1 + 6) = v48; // <-- DEBUG! v49 = *(float*)((*qword_141744EA0) + 24 * ((unsigned __int64)*(unsigned int*)(a1 + 8) >> 1) + 8) - *(float*)((*qword_141744EA0) + 24 * ((unsigned __int64)*(unsigned int*)(a1 + 8) >> 1) + 20); v50 = *(float*)((*qword_141744EA0) + 24 * ((unsigned __int64)*(unsigned int*)(a1 + 8) >> 1) + 4) - *(float*)((*qword_141744EA0) + 24 * ((unsigned __int64)*(unsigned int*)(a1 + 8) >> 1) + 16); v51 = *(float*)((*qword_141744EA0) + 24 * ((unsigned __int64)*(unsigned int*)(a1 + 8) >> 1)) - *(float*)((*qword_141744EA0) + 24 * ((unsigned __int64)*(unsigned int*)(a1 + 8) >> 1) + 12);