summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/act-iter.cc
diff options
context:
space:
mode:
authorRobert Vollmert <rvollmert@gmx.net>2010-03-22 21:01:02 +0100
committerRobert Vollmert <rvollmert@gmx.net>2010-03-22 21:01:02 +0100
commitc9c58b99022859e1ab92f1b75601b47f22eb9e04 (patch)
treecc8640b09155128fdf09aac3dc208c6656725810 /crawl-ref/source/act-iter.cc
parent63d646d1fc2cc13456cccaba6cbaff52205803cb (diff)
downloadcrawl-ref-c9c58b99022859e1ab92f1b75601b47f22eb9e04.tar.gz
crawl-ref-c9c58b99022859e1ab92f1b75601b47f22eb9e04.zip
Fix arena with global LOS.
For one, fix several crash bugs related to the player being outside LOS. These are prevented by checking against actor->alive() to check actor validity, and having you.alive() return false in the arena. Then, make sure LOS is actually invalidated for the arena, since that doesn't go through the usual level initialization path.
Diffstat (limited to 'crawl-ref/source/act-iter.cc')
-rw-r--r--crawl-ref/source/act-iter.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/crawl-ref/source/act-iter.cc b/crawl-ref/source/act-iter.cc
index 4d08131e9f..c7ad1791d1 100644
--- a/crawl-ref/source/act-iter.cc
+++ b/crawl-ref/source/act-iter.cc
@@ -65,6 +65,8 @@ actor_iterator actor_iterator::operator++(int)
bool actor_iterator::valid(const actor* a) const
{
+ if (!a->alive())
+ return (false);
switch (restr)
{
case R_CIRC: