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/externs.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/externs.h')
-rw-r--r-- | crawl-ref/source/externs.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crawl-ref/source/externs.h b/crawl-ref/source/externs.h index ed3f164c87..432b4eee52 100644 --- a/crawl-ref/source/externs.h +++ b/crawl-ref/source/externs.h @@ -1208,7 +1208,8 @@ public: bool is_levitating() const; bool invisible() const; bool can_see_invisible() const; - bool visible_to(const actor *looker) const ; + bool visible_to(const actor *looker) const; + bool mon_see_grid(int tx, int ty) const; bool can_see(const actor *target) const; bool is_icy() const; bool paralysed() const; |