From 89162833bce0a3fc8d4b75dd3300dc6db24e4666 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Sat, 15 Sep 2007 20:32:51 +0000 Subject: Applied Enne's fix to 1795522: "show_beam shouldn't work when just looking..." While I was at it, I also added another parameter needs_path that is set to false for spells that can be applied directly to a target (SPFLAG_GRID, SPFLAG_TARGET) such as Smiting, Conjure Flame or Freezing Cloud, so for these the initial beam path doesn't show, even if the option should be set to true. Note "initial beam path" - you can still toggle it to show the path anyway. For cases such as this we might enforce not drawing the path but there would have to be some kind of feedback, so the player doesn't go crazy trying to toggle the option. ;) I'll probably do it later, once I've found a way to give the information. Or would that be too spoily, in any case? git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2091 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/direct.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'crawl-ref/source/direct.cc') diff --git a/crawl-ref/source/direct.cc b/crawl-ref/source/direct.cc index ae23bd7c8e..917e7e313a 100644 --- a/crawl-ref/source/direct.cc +++ b/crawl-ref/source/direct.cc @@ -251,7 +251,8 @@ static void draw_ray_glyph(const coord_def &pos, int colour, //--------------------------------------------------------------- void direction(dist& moves, targeting_type restricts, targ_mode_type mode, bool just_looking, - const char *prompt, targeting_behaviour *beh) + bool needs_path, const char *prompt, + targeting_behaviour *beh) { static targeting_behaviour stock_behaviour; if (!beh) @@ -271,7 +272,7 @@ void direction(dist& moves, targeting_type restricts, cursor_control con(!Options.use_fake_cursor); int dir = 0; - bool show_beam = Options.show_beam; + bool show_beam = Options.show_beam && !just_looking && needs_path; ray_def ray; FixedVector < char, 2 > objfind_pos; -- cgit v1.2.3-54-g00ecf