Skip to content

Commit

Permalink
tweak(extra-natives-five): remove CCoronas struct
Browse files Browse the repository at this point in the history
  • Loading branch information
DaniGP17 committed Feb 4, 2025
1 parent da8f505 commit 3b48588
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions code/components/extra-natives-five/src/VfxNatives.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<void(CVehicle*, int32_t, rage::Mat34V*, int32_t*)> _getExhaustMatrix([]()
{
Expand Down Expand Up @@ -122,7 +111,7 @@ static HookFunction hookFunction([]()
});

{
g_coronas = hook::get_address<CCoronas*>(hook::get_pattern("F3 0F 11 44 24 28 F3 0F 11 7C 24 20 E8 ? ? ? ? E8", -4));
g_coronas = hook::get_address<void*>(hook::get_pattern("F3 0F 11 44 24 28 F3 0F 11 7C 24 20 E8 ? ? ? ? E8", -4));
}
});

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 3b48588

Please sign in to comment.