attempt to fix collected amount etc.

This commit is contained in:
RaveYard 2025-02-21 21:05:59 +01:00 committed by Magnus Norddahl
commit 8717076d96
2 changed files with 18 additions and 1 deletions

View file

@ -126,3 +126,20 @@ CCMD(autoaddlightprobes)
Printf("Spawned %d probes\n", probes);
}
CCMD(setlightlevel)
{
if (argv.argc() < 2)
{
Printf("Usage: setlightlevel <lightlevel>\n");
return;
}
int light = std::atoi(argv[1]);
for (int i = 0, size = level.sectors.size(); i < size; ++i)
{
auto& sector = level.sectors[i];
sector.SetLightLevel(light);
}
}

View file

@ -484,7 +484,6 @@ void LightProbeIncrementalBuilder::Step(const TArray<LightProbe>& probes, std::f
if (lastIndex >= probes.size())
{
lastIndex = 0;
collected = 0;
if (!probes.size())
{
@ -509,6 +508,7 @@ void LightProbeIncrementalBuilder::Step(const TArray<LightProbe>& probes, std::f
}
this->irradianceMaps.Clear();
this->prefilterMaps.Clear();
collected = 0;
}
}