diff options
author | Johanna Ploog <j-p-e-g@sourceforge.net> | 2011-02-14 19:03:27 +0100 |
---|---|---|
committer | Johanna Ploog <j-p-e-g@sourceforge.net> | 2011-02-14 19:03:27 +0100 |
commit | 131bca01dc64d08d7046ee9baa6a763df5e8c0eb (patch) | |
tree | b92ba516d7e0d169a215c4c10fc978840bd86e0f /crawl-ref/source/losparam.cc | |
parent | 4ffcede78598489d403c521e99ac9066863a187d (diff) | |
download | crawl-ref-131bca01dc64d08d7046ee9baa6a763df5e8c0eb.tar.gz crawl-ref-131bca01dc64d08d7046ee9baa6a763df5e8c0eb.zip |
Fix #3424: assertion when targeting beyond door mimic.
Diffstat (limited to 'crawl-ref/source/losparam.cc')
-rw-r--r-- | crawl-ref/source/losparam.cc | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/crawl-ref/source/losparam.cc b/crawl-ref/source/losparam.cc index 6ec82ea618..70b2c4be4e 100644 --- a/crawl-ref/source/losparam.cc +++ b/crawl-ref/source/losparam.cc @@ -100,10 +100,16 @@ opacity_type opacity_solid::operator()(const coord_def& p) const return OPC_HALF; else if (f == DNGN_TREE || f == DNGN_SWAMP_TREE) return OPC_HALF; - else if (monster_at(p) && monster_at(p)->type == MONS_BUSH) - return OPC_HALF; - else - return OPC_CLEAR; + else if (monster_at(p)) + { + if (monster_at(p)->type == MONS_DOOR_MIMIC) + return OPC_OPAQUE; + + if (monster_at(p)->type == MONS_BUSH) + return OPC_HALF; + } + + return OPC_CLEAR; } opacity_type opacity_monmove::operator()(const coord_def& p) const |