summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeil Moore <neil@s-z.org>2014-06-07 15:10:50 -0400
committerNeil Moore <neil@s-z.org>2014-06-07 15:10:58 -0400
commit1bbe59b729d032d3a7bddac4299d2f4e2c56efa1 (patch)
tree0105da7cf55b196952831780bc0560ebf17ecae0
parentc6b3eec5789e9786a2f8d4d5ef5ee0aaf7ad175c (diff)
downloadcrawl-ref-1bbe59b729d032d3a7bddac4299d2f4e2c56efa1.tar.gz
crawl-ref-1bbe59b729d032d3a7bddac4299d2f4e2c56efa1.zip
Don't crash on Gozag-detected underwater gold.
Don't bother detecting it.
-rw-r--r--crawl-ref/source/dactions.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/crawl-ref/source/dactions.cc b/crawl-ref/source/dactions.cc
index 958f386faf..c5e8c08360 100644
--- a/crawl-ref/source/dactions.cc
+++ b/crawl-ref/source/dactions.cc
@@ -332,11 +332,10 @@ static void _apply_daction(daction_type act)
detected = true;
}
update_item_at(*ri, true);
- if (detected)
- {
- ASSERT(env.map_knowledge(*ri).item());
+
+ // The gold might be beneath deep water.
+ if (detected && env.map_knowledge(*ri).item())
env.map_knowledge(*ri).flags |= MAP_DETECTED_ITEM;
- }
break;
}
}