From 3b485880ebf1dc56add039c9b8e7745b4636bee3 Mon Sep 17 00:00:00 2001 From: Daniel GP <96537843+DaniGP17@users.noreply.github.com> Date: Tue, 4 Feb 2025 20:27:30 +0100 Subject: [PATCH] tweak(extra-natives-five): remove CCoronas struct --- .../extra-natives-five/src/VfxNatives.cpp | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/code/components/extra-natives-five/src/VfxNatives.cpp b/code/components/extra-natives-five/src/VfxNatives.cpp index acc0fc60e3..214bbfd574 100644 --- a/code/components/extra-natives-five/src/VfxNatives.cpp +++ b/code/components/extra-natives-five/src/VfxNatives.cpp @@ -39,18 +39,7 @@ struct Corona_t float zBias; }; -struct CCoronas -{ - Corona_t m_coronas[1088]; // By default has 1088 corona slots, can be finded in: 41 B8 ? ? ? ? EB ? 8D 4A - uint32_t m_numCoronas; - - void Add(Vector3* position, float size, uint32_t color, float intensity, float zBias, Vector3* direction, float viewThreshold, float innerAngle, float outerAngle,uint16_t flags) - { - addLightCorona(this, position, size, color, intensity, zBias, direction, viewThreshold, innerAngle, outerAngle, flags); - } -}; - -static CCoronas* g_coronas; +static void* g_coronas; static hook::cdecl_stub _getExhaustMatrix([]() { @@ -122,7 +111,7 @@ static HookFunction hookFunction([]() }); { - g_coronas = hook::get_address(hook::get_pattern("F3 0F 11 44 24 28 F3 0F 11 7C 24 20 E8 ? ? ? ? E8", -4)); + g_coronas = hook::get_address(hook::get_pattern("F3 0F 11 44 24 28 F3 0F 11 7C 24 20 E8 ? ? ? ? E8", -4)); } }); @@ -169,7 +158,7 @@ static InitFunction initFunction([]() Vector3 position = { x, y, z }; Vector3 direction = { directionX, directionY, directionZ }; - g_coronas->Add(&position, size, color, intensity, zBias, &direction, viewThreshold, innerAngle, outerAngle, flags); + addLightCorona(g_coronas, &position, size, color, intensity, zBias, &direction, viewThreshold, innerAngle, outerAngle, flags); }); // GH-2003: Backport b3095 vehicle exhaust bone getters to earlier builds