diff options
author | Raphael Langella <raphael.langella@gmail.com> | 2011-08-30 17:47:20 +0200 |
---|---|---|
committer | Raphael Langella <raphael.langella@gmail.com> | 2011-09-05 23:20:16 +0200 |
commit | 91f958751568cd00aa8bd0df8ce47f56c5edf7ba (patch) | |
tree | 4640898fcedc93d7d046171e1e37f390afab133a /crawl-ref/source/losparam.cc | |
parent | 8385fdb8f0862ae32c9d2a5bcdde1f80934ff590 (diff) | |
download | crawl-ref-91f958751568cd00aa8bd0df8ce47f56c5edf7ba.tar.gz crawl-ref-91f958751568cd00aa8bd0df8ce47f56c5edf7ba.zip |
Merge all the feature mimics into a single monster type.
It's now possible to create any kind of feature mimic using &M.
Diffstat (limited to 'crawl-ref/source/losparam.cc')
-rw-r--r-- | crawl-ref/source/losparam.cc | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/crawl-ref/source/losparam.cc b/crawl-ref/source/losparam.cc index bf35185c78..93518ce1e2 100644 --- a/crawl-ref/source/losparam.cc +++ b/crawl-ref/source/losparam.cc @@ -26,12 +26,7 @@ opacity_type opacity_default::operator()(const coord_def& p) const else if (f == DNGN_TREE || f == DNGN_SWAMP_TREE) return OPC_HALF; if (const monster *mon = monster_at(p)) - { - if (mon->type == MONS_BUSH) - return OPC_HALF; - if (mon->type == MONS_DOOR_MIMIC) - return OPC_OPAQUE; - } + return mons_opacity(mon); return OPC_CLEAR; } @@ -100,14 +95,8 @@ 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)) - { - if (monster_at(p)->type == MONS_DOOR_MIMIC) - return OPC_OPAQUE; - - if (monster_at(p)->type == MONS_BUSH) - return OPC_HALF; - } + else if (const monster *mon = monster_at(p)) + return mons_opacity(mon); return OPC_CLEAR; } |