mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 01:01:33 +00:00
Fix light fades being unable to lower light levels
This commit is contained in:
parent
b99ecde7b8
commit
b487a71533
1 changed files with 2 additions and 2 deletions
|
@ -353,8 +353,8 @@ void P_FadeLightBySector(sector_t *sector, INT32 destvalue, INT32 speed, boolean
|
|||
else
|
||||
{
|
||||
// Speed means increment per tic (literally speed).
|
||||
ll->timer = FixedDiv((destvalue<<FRACBITS) - ll->fixedcurlevel, speed<<FRACBITS)>>FRACBITS;
|
||||
ll->fixedpertic = speed<<FRACBITS;
|
||||
ll->timer = abs(FixedDiv((destvalue<<FRACBITS) - ll->fixedcurlevel, speed<<FRACBITS)>>FRACBITS);
|
||||
ll->fixedpertic = ll->destlevel < ll->sourcelevel ? -speed<<FRACBITS : speed<<FRACBITS;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue