2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-06-05 13:53:29 +00:00

CCubeRenderer: Limit dynamic light count in ActivateLightsForModel

This commit is contained in:
Luke Street 2022-03-19 20:52:13 -04:00
parent 3800322735
commit 9bcb06d92a

View File

@ -519,6 +519,10 @@ void CCubeRenderer::ActivateLightsForModel(const CAreaListItem* areaItem, CCubeM
u32 lightIdx = 0; u32 lightIdx = 0;
for (const auto& light : x300_dynamicLights) { for (const auto& light : x300_dynamicLights) {
if (lightIdx >= LightCount) {
break;
}
if (lightOctreeWords == nullptr || TestBit(lightOctreeWords, model.GetIndex())) { if (lightOctreeWords == nullptr || TestBit(lightOctreeWords, model.GetIndex())) {
bool loaded = false; bool loaded = false;
const float radius = const float radius =