diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-01-17 05:01:24 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-01-17 05:01:24 +0000 |
commit | 12e8a8922368a4bd47be85a418785ec0d9318392 (patch) | |
tree | 6466431c3918ad72b25f3ee5a8b429e6707f6589 /crawl-ref/source/output.cc | |
parent | 7ea8464463a1b0997287f51c734a5f3ebb4e4f64 (diff) | |
download | crawl-ref-12e8a8922368a4bd47be85a418785ec0d9318392.tar.gz crawl-ref-12e8a8922368a4bd47be85a418785ec0d9318392.zip |
Fix information leak about monster damage levels for monsters with no
damage messages in the "V" screen.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8489 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/output.cc')
-rw-r--r-- | crawl-ref/source/output.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/crawl-ref/source/output.cc b/crawl-ref/source/output.cc index a055aaa186..47b7f913f7 100644 --- a/crawl-ref/source/output.cc +++ b/crawl-ref/source/output.cc @@ -1483,10 +1483,12 @@ static void _print_next_monster_desc(const std::vector<monster_pane_info>& mons, // Print an "icon" representing damage level. const monsters *mon = mons[start].m_mon; std::string damage_desc; + mon_dam_level_type damage_level; - if (!monster_descriptor(mon->type, MDSC_NOMSG_WOUNDS)) - mons_get_damage_level(mon, damage_desc, damage_level); - else + mons_get_damage_level(mon, damage_desc, damage_level); + + // If no messages about wounds, don't display damage level either. + if (monster_descriptor(mon->type, MDSC_NOMSG_WOUNDS)) damage_level = MDAM_OKAY; int dam_color; |