components/prboom/p_lights.c
//
// P_SpawnFireFlicker()
//
// Spawns a fire flicker lighting thinker
//
// Passed the sector that spawned the thinker
// Returns nothing
//
P_SpawnFireFlicker()
Spawns a fire flicker lighting thinker

Passed the sector that spawned the thinker
Returns nothing
P_SpawnFireFlicker () Spawns a fire flicker lighting thinker Passed the sector that spawned the thinker Returns nothing
void P_SpawnFireFlicker (sector_t*  sector)
{
  fireflicker_t*  flick;
  sector->special &= ~31; 
  flick = Z_Malloc ( sizeof(*flick), PU_LEVSPEC, 0);
  memset(flick, 0, sizeof(*flick));
  P_AddThinker (&flick->thinker);
  flick->thinker.function = T_FireFlicker;
  flick->sector = sector;
  flick->maxlight = sector->lightlevel;
  flick->minlight = P_FindMinSurroundingLight(sector,sector->lightlevel)+16;
  flick->count = 4;
}
void P_SpawnFireFlicker ( sector_t * sector ) { fireflicker_t * flick ; sector -> special &= ~ 31 ; flick = Z_Malloc ( sizeof ( * flick ) , PU_LEVSPEC , 0 ) ; memset ( flick , 0 , sizeof ( * flick ) ) ; P_AddThinker ( & flick -> thinker ) ; flick -> thinker . function = T_FireFlicker ; flick -> sector = sector ; flick -> maxlight = sector -> lightlevel ; flick -> minlight = P_FindMinSurroundingLight ( sector , sector -> lightlevel ) + 16 ; flick -> count = 4 ; }
P_SpawnFireFlicker()
Spawns a fire flicker lighting thinker
P_SpawnFireFlicker () Spawns a fire flicker lighting thinker
// Note that we are resetting sector attributes. // Nothing special about it during gameplay. //jff 3/14/98 clear non-generalized sector type