From 42bde3cb0caf63ea19cfca4237d957c86390b977 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Tue, 16 Jun 2009 18:22:29 +0000 Subject: 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 --- crawl-ref/source/directn.cc | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'crawl-ref/source/directn.cc') 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) -- cgit v1.2.3-54-g00ecf