Fix cache while trace isn't moved to GPU

isn't the fastest or most memory efficient fix, but should hopefully only be temporary
This commit is contained in:
Ricardo Luís Vaz Silva 2024-12-30 17:24:05 -03:00 committed by Nash Muhandes
commit 9d9938cccc
5 changed files with 50 additions and 64 deletions

View file

@ -134,6 +134,7 @@ static FDynamicLight *GetLight(FLevelLocals *Level)
ret->mShadowmapIndex = 1024;
ret->Level = Level;
ret->Pos.X = -10000000; // not a valid coordinate.
return ret;
}
@ -437,6 +438,27 @@ void FDynamicLight::Tick()
updated = true;
}
if(TraceActors())
{
if(updated)
{
ActorList.Clear();
}
else if(ActorList.Size() > 0)
{
unsigned i = ActorList.Size() - 1;
while(i > 0)
{
if(ActorList[i]->ObjectFlags & OF_EuthanizeMe)
{
ActorList.Delete(i);
ActorResult.Delete(i);
}
i--;
}
}
}
wasactive = m_active;
oldred = GetRed();
oldblue = GetBlue();