diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-05-18 09:40:53 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-05-18 09:40:53 +0000 |
commit | e2cbc98a162d37386b3191ccf16c0d64ad7bb1b2 (patch) | |
tree | 3c3fc7e3c9e0cf7bfaded82101d233492dac2216 /crawl-ref/source/mon-util.h | |
parent | 8f675841ee07a21138fe098204f46018d28ea3b5 (diff) | |
download | crawl-ref-e2cbc98a162d37386b3191ccf16c0d64ad7bb1b2.tar.gz crawl-ref-e2cbc98a162d37386b3191ccf16c0d64ad7bb1b2.zip |
Pull code from mon->can_see(target) into a new function mon->see_grid()
and use it in the checks for monster/monster visibility.
I didn't have the time to test it but it should at least solve part of
the problem of monsters firing through walls (if monster visibility is
even checked there, which I don't know).
Also (as usually), more code cleanup.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5117 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/mon-util.h')
-rw-r--r-- | crawl-ref/source/mon-util.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/crawl-ref/source/mon-util.h b/crawl-ref/source/mon-util.h index ef33b70451..d2b50087a4 100644 --- a/crawl-ref/source/mon-util.h +++ b/crawl-ref/source/mon-util.h @@ -410,6 +410,7 @@ mon_itemuse_type mons_itemuse(int mc); * *********************************************************************** */ bool mons_see_invis(const monsters *mon); bool mons_sense_invis(const monsters *mon); +bool mon_can_see_monster( const monsters *mon, const monsters *targ ); bool mons_monster_visible( const monsters *mon, const monsters *targ ); bool mons_player_visible( const monsters *mon ); |