- Fixed missing sector light clamp in DFlicker.

For some reason, this code didn't care about the sector light limits. Found by code inspection.
This commit is contained in:
Edoardo Prezioso 2016-05-04 20:33:17 +02:00 committed by Christoph Oelckers
parent c193bb7799
commit 52995f8fc2

View file

@ -301,9 +301,9 @@ void DFlicker::Tick ()
DFlicker::DFlicker (sector_t *sector, int upper, int lower) DFlicker::DFlicker (sector_t *sector, int upper, int lower)
: DLighting (sector) : DLighting (sector)
{ {
m_MaxLight = upper; m_MaxLight = sector_t::ClampLight(upper);
m_MinLight = lower; m_MinLight = sector_t::ClampLight(lower);
sector->lightlevel = upper; sector->lightlevel = m_MaxLight;
m_Count = (pr_flicker()&64)+1; m_Count = (pr_flicker()&64)+1;
} }