components/prboom/p_lights.c
//
// P_SpawnLightFlash()
//
// Spawns a broken light flash lighting thinker
//
// Passed the sector that spawned the thinker
// Returns nothing
//
P_SpawnLightFlash()
Spawns a broken light flash lighting thinker

Passed the sector that spawned the thinker
Returns nothing
P_SpawnLightFlash () Spawns a broken light flash lighting thinker Passed the sector that spawned the thinker Returns nothing
void P_SpawnLightFlash (sector_t* sector)
{
  lightflash_t* flash;
  sector->special &= ~31; 
  flash = Z_Malloc ( sizeof(*flash), PU_LEVSPEC, 0);
  memset(flash, 0, sizeof(*flash));
  P_AddThinker (&flash->thinker);
  flash->thinker.function = T_LightFlash;
  flash->sector = sector;
  flash->maxlight = sector->lightlevel;
  flash->minlight = P_FindMinSurroundingLight(sector,sector->lightlevel);
  flash->maxtime = 64;
  flash->mintime = 7;
  flash->count = (P_Random(pr_lights)&flash->maxtime)+1;
}
void P_SpawnLightFlash ( sector_t * sector ) { lightflash_t * flash ; sector -> special &= ~ 31 ; flash = Z_Malloc ( sizeof ( * flash ) , PU_LEVSPEC , 0 ) ; memset ( flash , 0 , sizeof ( * flash ) ) ; P_AddThinker ( & flash -> thinker ) ; flash -> thinker . function = T_LightFlash ; flash -> sector = sector ; flash -> maxlight = sector -> lightlevel ; flash -> minlight = P_FindMinSurroundingLight ( sector , sector -> lightlevel ) ; flash -> maxtime = 64 ; flash -> mintime = 7 ; flash -> count = ( P_Random ( pr_lights ) & flash -> maxtime ) + 1 ; }
P_SpawnLightFlash()
Spawns a broken light flash lighting thinker
P_SpawnLightFlash () Spawns a broken light flash lighting thinker
// nothing special about it during gameplay //jff 3/14/98 clear non-generalized sector type