force updated lights to ignore actor trace cache

This commit is contained in:
Ricardo Luís Vaz Silva 2024-12-20 01:19:22 -03:00 committed by Magnus Norddahl
commit af5497c6dd
3 changed files with 18 additions and 11 deletions

View file

@ -421,17 +421,22 @@ void FDynamicLight::Tick()
lightStrength = LightCalcStrength(m_currentRadius);
}
bool updated = UpdateLocation();
updated = UpdateLocation();
if(!updated && markTiles && (m_active != wasactive || oldred != GetRed() || oldblue != GetBlue() || oldgreen != GetGreen() || oldradius != m_currentRadius))
if(!updated && (m_active != wasactive || oldred != GetRed() || oldblue != GetBlue() || oldgreen != GetGreen() || oldradius != m_currentRadius))
{
MarkTilesForUpdate(Level, touching_sides, touching_sector);
if(markTiles)
{
MarkTilesForUpdate(Level, touching_sides, touching_sector);
}
wasactive = m_active;
oldred = GetRed();
oldblue = GetBlue();
oldgreen = GetGreen();
updated = true;
}
wasactive = m_active;
oldred = GetRed();
oldblue = GetBlue();
oldgreen = GetGreen();
}