light source `obj' is being made brighter or dimmer */
| 823 | |
| 824 | /* light source `obj' is being made brighter or dimmer */ |
| 825 | void |
| 826 | obj_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. */ |
no test coverage detected