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

Function obj_move_light_source

src/light.c:705–715  ·  view source on GitHub ↗

Change light source's ID from src to dest. */

Source from the content-addressed store, hash-verified

703
704/* Change light source's ID from src to dest. */
705void
706obj_move_light_source(struct obj *src, struct obj *dest)
707{
708 light_source *ls;
709
710 for (ls = gl.light_base; ls; ls = ls->next)
711 if (ls->type == LS_OBJECT && ls->id.a_obj == src)
712 ls->id.a_obj = dest;
713 src->lamplit = 0;
714 dest->lamplit = 1;
715}
716
717/* return true if there exist any light sources */
718boolean

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected