diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-06-03 06:49:58 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-06-03 06:49:58 +0000 |
commit | 84a6e8527deb1305ce0ed6124bfc0e9513c0900b (patch) | |
tree | b36726751bb916b08367f48b7de47e7ecd47ed9b /crawl-ref/source/direct.h | |
parent | 8e921b6d07237f6a5b2501cc13ee09d08bf9cc30 (diff) | |
download | crawl-ref-84a6e8527deb1305ce0ed6124bfc0e9513c0900b.tar.gz crawl-ref-84a6e8527deb1305ce0ed6124bfc0e9513c0900b.zip |
Improve beam selection by trying to match slopes (well, munged slopes) to the
slope to the target. We use the average of the beam slope and the slope of the
starting point of the beam from the center of the starting cell.
This picks better beams for points close to the player - (2,1) for instance
than my first attempt.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1515 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/direct.h')
-rw-r--r-- | crawl-ref/source/direct.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/crawl-ref/source/direct.h b/crawl-ref/source/direct.h index 6c7d23c95f..460b14527a 100644 --- a/crawl-ref/source/direct.h +++ b/crawl-ref/source/direct.h @@ -31,6 +31,7 @@ bool in_los_bounds(int x, int y); bool in_viewport_bounds(int x, int y); bool in_los(int x, int y); bool in_vlos(int x, int y); +bool in_vlos(const coord_def &pos); int dos_direction_unmunge(int doskey); |