summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/player.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-09-25 17:30:31 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-09-25 17:30:31 +0000
commit57f3e71ae59d5e4830bdf787d9f2d5e9d5fe8fc8 (patch)
tree835d7e23d1c0d27e935015288effd8115a949cf0 /crawl-ref/source/player.cc
parent1f9e38751c81744f2e8d4ffb1aea7f3870ba9d5b (diff)
downloadcrawl-ref-57f3e71ae59d5e4830bdf787d9f2d5e9d5fe8fc8.tar.gz
crawl-ref-57f3e71ae59d5e4830bdf787d9f2d5e9d5fe8fc8.zip
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
Diffstat (limited to 'crawl-ref/source/player.cc')
-rw-r--r--crawl-ref/source/player.cc10
1 files changed, 5 insertions, 5 deletions
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<const monsters*>(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);
}