MCPcopy Create free account
hub / github.com/NetHack/NetHack / discard_flashes

Function discard_flashes

src/light.c:360–370  ·  view source on GitHub ↗

camera flashes have Null object; caller wants to get rid of them now */

Source from the content-addressed store, hash-verified

358
359/* camera flashes have Null object; caller wants to get rid of them now */
360staticfn void
361discard_flashes(void)
362{
363 light_source *ls, *nxt_ls;
364
365 for (ls = gl.light_base; ls; ls = nxt_ls) {
366 nxt_ls = ls->next;
367 if (ls->type == LS_OBJECT && !ls->id.a_obj)
368 delete_ls(ls);
369 }
370}
371
372/* (mon->mx == 0) implies migrating */
373#define mon_is_local(mon) ((mon)->mx > 0)

Callers 2

transient_light_cleanupFunction · 0.85
save_light_sourcesFunction · 0.85

Calls 1

delete_lsFunction · 0.85

Tested by

no test coverage detected