summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/direct.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2007-09-15 20:32:51 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2007-09-15 20:32:51 +0000
commit89162833bce0a3fc8d4b75dd3300dc6db24e4666 (patch)
treeca071c4a8690e06699305f91aa1853448af82150 /crawl-ref/source/direct.cc
parent5991be809a9b206d7450cdf455157e40d98d40e2 (diff)
downloadcrawl-ref-89162833bce0a3fc8d4b75dd3300dc6db24e4666.tar.gz
crawl-ref-89162833bce0a3fc8d4b75dd3300dc6db24e4666.zip
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
Diffstat (limited to 'crawl-ref/source/direct.cc')
-rw-r--r--crawl-ref/source/direct.cc5
1 files changed, 3 insertions, 2 deletions
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;