From 915c9b4e7daf2f49c25e254b66ef6e53a9207b29 Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Tue, 12 Feb 2008 10:59:11 +0000 Subject: Merged revisions 3687-3688,3690 via svnmerge from https://themanaworld.svn.sourceforge.net/svnroot/themanaworld/tmw/branches/0.0 ........ r3687 | crush_tmw | 2007-10-26 02:22:12 +0200 (Fri, 26 Oct 2007) | 1 line Added possibility of length limitation to browserbox and used it for the chatlog (length set by the config option "ChatLogLength"). ........ r3688 | crush_tmw | 2007-10-26 02:38:00 +0200 (Fri, 26 Oct 2007) | 1 line Removed some completely useless code from the chat class. ........ r3690 | crush_tmw | 2007-10-26 14:50:49 +0200 (Fri, 26 Oct 2007) | 1 line Implemented monster hurt sounds and added new sound effects by Cosmostrator. ........ --- src/monster.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/monster.cpp') diff --git a/src/monster.cpp b/src/monster.cpp index bc964b0b..9cbd28eb 100644 --- a/src/monster.cpp +++ b/src/monster.cpp @@ -93,6 +93,13 @@ Monster::handleAttack() sound.playSfx(mi.getSound(MONSTER_EVENT_HIT)); } +void +Monster::takeDamage(int amount) +{ + if (amount > 0) sound.playSfx(getInfo().getSound(MONSTER_EVENT_HURT)); + Being::takeDamage(amount); +} + Being::TargetCursorSize Monster::getTargetCursorSize() const { -- cgit v1.2.3-70-g09d2