diff options
author | Johanna Ploog <j-p-e-g@users.sourceforge.net> | 2010-01-12 19:26:06 +0100 |
---|---|---|
committer | Johanna Ploog <j-p-e-g@users.sourceforge.net> | 2010-01-12 19:26:06 +0100 |
commit | 1767660614a67312a647dc709ee4a96096e35ef7 (patch) | |
tree | c9d4208c290519ca68b1b93408518f34adf2aa27 /crawl-ref/source/view.cc | |
parent | 84a9fb36ae9052113e767b681b2452542d24a294 (diff) | |
download | crawl-ref-1767660614a67312a647dc709ee4a96096e35ef7.tar.gz crawl-ref-1767660614a67312a647dc709ee4a96096e35ef7.zip |
Update exclusion annotations for flamethrower exclusions.
If a flamethrower cell is already excluded, add a description if it
doesn't have one already.
Diffstat (limited to 'crawl-ref/source/view.cc')
-rw-r--r-- | crawl-ref/source/view.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/crawl-ref/source/view.cc b/crawl-ref/source/view.cc index 7494f55f6d..3e6ad5f627 100644 --- a/crawl-ref/source/view.cc +++ b/crawl-ref/source/view.cc @@ -711,6 +711,7 @@ static int player_view_update_at(const coord_def &gc) cloud_struct &cl = env.cloud[cloudidx]; cloud_type ctype = cl.type; + bool did_exclude = false; if (!is_harmless_cloud(ctype) && cl.whose == KC_OTHER && cl.killer == KILL_MISC) @@ -718,10 +719,12 @@ static int player_view_update_at(const coord_def &gc) for (adjacent_iterator ai(gc, false); ai; ++ai) { // Optionally add exclude, deferring updates. - if (!cell_is_solid(*ai) && !is_exclude_root(*ai)) + if (!cell_is_solid(*ai)) { + bool was_exclusion = is_exclude_root(*ai); set_exclude(*ai, 0, false, false, true); - ret |= UF_ADDED_EXCLUDE; + if (!did_exclude && !was_exclusion) + ret |= UF_ADDED_EXCLUDE; } } } |