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

Function obj_adjust_light_radius

src/light.c:825–838  ·  view source on GitHub ↗

light source `obj' is being made brighter or dimmer */

Source from the content-addressed store, hash-verified

823
824/* light source `obj' is being made brighter or dimmer */
825void
826obj_adjust_light_radius(struct obj *obj, int new_radius)
827{
828 light_source *ls;
829
830 for (ls = gl.light_base; ls; ls = ls->next)
831 if (ls->type == LS_OBJECT && ls->id.a_obj == obj) {
832 if (new_radius != ls->range)
833 gv.vision_full_recalc = 1;
834 ls->range = new_radius;
835 return;
836 }
837 impossible("obj_adjust_light_radius: can't find %s", xname(obj));
838}
839
840/* Candlelight is proportional to the number of candles;
841 minimum range is 2 rather than 1 for playability. */

Callers 1

maybe_adjust_lightFunction · 0.85

Calls 2

xnameFunction · 0.85
impossibleFunction · 0.70

Tested by

no test coverage detected