From 57f3e71ae59d5e4830bdf787d9f2d5e9d5fe8fc8 Mon Sep 17 00:00:00 2001 From: dolorous Date: Thu, 25 Sep 2008 17:30:31 +0000 Subject: In ouch(), use NON_MONSTER instead of 0 as the index for non-monster attacks, so as to avoid overlap with the first monster on the level. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6985 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/player.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'crawl-ref/source/player.cc') diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index 664fc387ff..6b1f1788ca 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -4548,9 +4548,9 @@ void modify_stat(stat_type which_stat, char amount, bool suppress_msg, if (amount < 0 && *ptr_stat < 1) { if (cause == NULL) - ouch(INSTANT_DEATH, 0, kill_type); + ouch(INSTANT_DEATH, NON_MONSTER, kill_type); else - ouch(INSTANT_DEATH, 0, kill_type, cause, see_source); + ouch(INSTANT_DEATH, NON_MONSTER, kill_type, cause, see_source); } if (ptr_stat == &you.strength) @@ -4636,7 +4636,7 @@ void dec_hp(int hp_loss, bool fatal, const char *aux) // fatal, somebody else is doing the bookkeeping, and we don't want to mess // with that. if (!fatal && aux) - ouch(hp_loss, -1, KILLED_BY_SOMETHING, aux); + ouch(hp_loss, NON_MONSTER, KILLED_BY_SOMETHING, aux); else you.hp -= hp_loss; @@ -6498,14 +6498,14 @@ int player::hurt(const actor *agent, int amount, beam_type flavour) const monsters *mon = dynamic_cast(agent); if (agent->atype() == ACT_MONSTER) { - ouch(amount, monster_index( mon ), + ouch(amount, monster_index(mon), KILLED_BY_MONSTER, "", player_monster_visible(mon)); } else { // Should never happen! ASSERT(false); - ouch(amount, 0, KILLED_BY_SOMETHING); + ouch(amount, NON_MONSTER, KILLED_BY_SOMETHING); } return (amount); } -- cgit v1.2.3-54-g00ecf