From 2c9b3ce286f5c274cb0348253259bcca24d967a3 Mon Sep 17 00:00:00 2001 From: Robert Vollmert Date: Mon, 16 Nov 2009 17:48:53 +0100 Subject: Simplify out-of-range darkening. Also fixes the range_view_annotator destructor clobbering option "darken_beyond_range". Options.target_range is now really an option, and called Options.darken_beyond_range. Current darkening range is now stored in crawl_state.darken_range. I can't reproduce SIGHUP retaining darkened range (BR 2151183) (why would it be saved?), so range_view_annotator is not a crawl_exit_hook anymore. crawl_exit_hook is not used anymore, but still present. --- crawl-ref/source/spl-cast.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'crawl-ref/source/spl-cast.cc') diff --git a/crawl-ref/source/spl-cast.cc b/crawl-ref/source/spl-cast.cc index 06f4f1771b..812cfdbfe9 100644 --- a/crawl-ref/source/spl-cast.cc +++ b/crawl-ref/source/spl-cast.cc @@ -754,13 +754,13 @@ bool cast_a_spell(bool check_range, spell_type spell) mpr("There are no visible monsters within range! (Use Z to " "cast anyway.)"); - if (Options.target_range != -1) + if (Options.darken_beyond_range) { - Options.target_range = _calc_spell_range(spell); - viewwindow(false); + crawl_state.darken_range = _calc_spell_range(spell); + viewwindow(false, false); delay(500); - Options.target_range = 0; - viewwindow(false); + crawl_state.darken_range = -1; + viewwindow(false, false); } return (false); } -- cgit v1.2.3-54-g00ecf