summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/directn.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-06-16 18:22:29 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-06-16 18:22:29 +0000
commit42bde3cb0caf63ea19cfca4237d957c86390b977 (patch)
treed4d11ebac689677a05cd6b66e4383ff98ecba955 /crawl-ref/source/directn.cc
parent678e0a6c132e04803d98aed21c28a284568e9dda (diff)
downloadcrawl-ref-42bde3cb0caf63ea19cfca4237d957c86390b977.tar.gz
crawl-ref-42bde3cb0caf63ea19cfca4237d957c86390b977.zip
Apply my mouse speed-up commit to trunk.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9987 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/directn.cc')
-rw-r--r--crawl-ref/source/directn.cc18
1 files changed, 10 insertions, 8 deletions
diff --git a/crawl-ref/source/directn.cc b/crawl-ref/source/directn.cc
index eaeb19075f..15a174c59a 100644
--- a/crawl-ref/source/directn.cc
+++ b/crawl-ref/source/directn.cc
@@ -1027,7 +1027,8 @@ void direction(dist& moves, targeting_type restricts,
}
cursor_control con(!Options.use_fake_cursor);
- mouse_control mc(MOUSE_MODE_TARGET);
+ mouse_control mc(needs_path && !just_looking ? MOUSE_MODE_TARGET_PATH
+ : MOUSE_MODE_TARGET);
range_view_annotator rva(range);
int dir = 0;
@@ -1130,18 +1131,19 @@ void direction(dist& moves, targeting_type restricts,
if (key_command == CMD_TARGET_MOUSE_SELECT)
{
key_command = CMD_TARGET_SELECT;
-
+// Do we really need this? (jpeg)
+// Looks like the redrawing routine already handles it.
+#if 0
if (needs_path && range > 0)
{
ray_def raycopy = ray;
int l = 0;
- while (raycopy.pos() != moves.target && l < range)
- {
- l++;
+ while (raycopy.pos() != moves.target && range > l++)
raycopy.advance_through(moves.target);
- }
+
moves.target = raycopy.pos();
}
+#endif
}
}
else
@@ -1176,8 +1178,8 @@ void direction(dist& moves, targeting_type restricts,
}
bool need_beam_redraw = false;
- bool force_redraw = false;
- bool loop_done = false;
+ bool force_redraw = false;
+ bool loop_done = false;
coord_def old_target = moves.target;
if (skip_iter)