diff options
author | Steve Melenchuk <smelenchuk@gmail.com> | 2014-02-23 19:54:17 -0700 |
---|---|---|
committer | Steve Melenchuk <smelenchuk@gmail.com> | 2014-02-23 19:54:17 -0700 |
commit | b93ce5e72c28508394899776f4d4365bffb060cc (patch) | |
tree | 6d6e39bca9d16711d3534a682b1bc4162f2aed89 /crawl-ref/source/hiscores.cc | |
parent | 909abdbd69d2bbc1fb7e210b2e239c7f6b727322 (diff) | |
download | crawl-ref-b93ce5e72c28508394899776f4d4365bffb060cc.tar.gz crawl-ref-b93ce5e72c28508394899776f4d4365bffb060cc.zip |
Introduce a mons_is_player_shadow() to help with an ASSERT.
If the shadow kills something, it's possible for it to still be around
when the code is called for this assert; this was seen with terrain
change reversions.
Diffstat (limited to 'crawl-ref/source/hiscores.cc')
-rw-r--r-- | crawl-ref/source/hiscores.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crawl-ref/source/hiscores.cc b/crawl-ref/source/hiscores.cc index 7b8021a9f1..d78fe1dfc5 100644 --- a/crawl-ref/source/hiscores.cc +++ b/crawl-ref/source/hiscores.cc @@ -1216,7 +1216,7 @@ void scorefile_entry::init_death_cause(int dam, int dsrc, if (death || you.can_see(mons)) death_source_name = mons->full_name(desc, true); - if (mons->mid == MID_PLAYER && mons->mname.empty()) + if (mons_is_player_shadow(mons)) death_source_name = "their own shadow"; // heh if (death && mons->type == MONS_MARA_FAKE) |