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

View File

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