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
1 changed files with 4 additions and 0 deletions

View File

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