components/prboom/p_lights.c
//
// T_FireFlicker()
//
// Firelight flicker action routine, called once per tick
//
// Passed a fireflicker_t structure containing light levels and timing
// Returns nothing
//
T_FireFlicker()
Firelight flicker action routine, called once per tick

Passed a fireflicker_t structure containing light levels and timing
Returns nothing
T_FireFlicker () Firelight flicker action routine called once per tick Passed a fireflicker_t structure containing light levels and timing Returns nothing
void T_FireFlicker (fireflicker_t* flick)
{
  int amount;
  if (--flick->count)
    return;
  amount = (P_Random(pr_lights)&3)*16;
  if (flick->sector->lightlevel - amount < flick->minlight)
    flick->sector->lightlevel = flick->minlight;
  else
    flick->sector->lightlevel = flick->maxlight - amount;
  flick->count = 4;
}
void T_FireFlicker ( fireflicker_t * flick ) { int amount ; if ( -- flick -> count ) return ; amount = ( P_Random ( pr_lights ) & 3 ) * 16 ; if ( flick -> sector -> lightlevel - amount < flick -> minlight ) flick -> sector -> lightlevel = flick -> minlight ; else flick -> sector -> lightlevel = flick -> maxlight - amount ; flick -> count = 4 ; }
T_FireFlicker()
Firelight flicker action routine, called once per tick
T_FireFlicker () Firelight flicker action routine called once per tick