diff options
author | Robert Vollmert <rvollmert@gmx.net> | 2009-10-21 15:42:49 +0200 |
---|---|---|
committer | Robert Vollmert <rvollmert@gmx.net> | 2009-10-22 22:37:06 +0200 |
commit | 07ef1ffe1ce0431004b79ede171f3f6bfa16549f (patch) | |
tree | bc15c42f04c5bafbb4d674addbaf8bc944c38669 /crawl-ref/source/player.cc | |
parent | 7afa089db8b01b1810c5903309f7302545638550 (diff) | |
download | crawl-ref-07ef1ffe1ce0431004b79ede171f3f6bfa16549f.tar.gz crawl-ref-07ef1ffe1ce0431004b79ede171f3f6bfa16549f.zip |
Simply visibility checks in fight.cc.
Make use of actor::visible_to. Also fix player::visible_to to make
the player invisible to himself when not seeing invisible.
Diffstat (limited to 'crawl-ref/source/player.cc')
-rw-r--r-- | crawl-ref/source/player.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index 24c828fe45..3892682d80 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -7356,7 +7356,7 @@ bool player::invisible() const bool player::visible_to(const actor *looker) const { if (this == looker) - return (true); + return (can_see_invisible() || !invisible()); const monsters* mon = dynamic_cast<const monsters*>(looker); return mons_player_visible(mon); |