summaryrefslogtreecommitdiff
path: root/src/being.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/being.cpp')
-rw-r--r--src/being.cpp23
1 files changed, 12 insertions, 11 deletions
diff --git a/src/being.cpp b/src/being.cpp
index 6b21198a..98ba78e1 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -49,7 +49,6 @@
#include "net/npchandler.h"
#include "resources/beinginfo.h"
-#include "resources/image.h"
#include "resources/itemdb.h"
#include "resources/iteminfo.h"
#include "resources/monsterdb.h"
@@ -129,6 +128,11 @@ ActorSprite::TargetCursorSize Being::getTargetCursorSize() const
return mInfo->getTargetCursorSize();
}
+Cursor Being::getHoverCursor() const
+{
+ return mInfo->getHoverCursor();
+}
+
unsigned char Being::getWalkMask() const
{
return mInfo->getWalkMask();
@@ -345,17 +349,14 @@ void Being::takeDamage(Being *attacker, int amount,
if (amount > 0)
{
- if (mInfo)
+ if (attacker)
{
- if (attacker)
- {
- sound.playSfx(mInfo->getSound(SOUND_EVENT_HURT),
- attacker->getPixelX(), attacker->getPixelY());
- }
- else
- {
- sound.playSfx(mInfo->getSound(SOUND_EVENT_HURT));
- }
+ sound.playSfx(mInfo->getSound(SOUND_EVENT_HURT),
+ attacker->getPixelX(), attacker->getPixelY());
+ }
+ else
+ {
+ sound.playSfx(mInfo->getSound(SOUND_EVENT_HURT));
}
if (getType() == MONSTER)