summaryrefslogtreecommitdiff
path: root/src/being.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/being.cpp')
-rw-r--r--src/being.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/being.cpp b/src/being.cpp
index 5e869662..c0f48871 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -583,12 +583,16 @@ void Being::setAction(Action action, int attackId)
switch (action)
{
case MOVE:
+ sound.playSfx(mInfo->getSound(SoundEvent::MOVE),
+ getPixelX(), getPixelY());
currentAction = SpriteAction::MOVE;
// Note: When adding a run action,
// Differentiate walk and run with action name,
// while using only the ACTION_MOVE.
break;
case SIT:
+ sound.playSfx(mInfo->getSound(SoundEvent::SIT),
+ getPixelX(), getPixelY());
currentAction = SpriteAction::SIT;
break;
case ATTACK:
@@ -635,6 +639,10 @@ void Being::setAction(Action action, int attackId)
case STAND:
currentAction = SpriteAction::STAND;
break;
+ case SPAWN:
+ sound.playSfx(mInfo->getSound(SoundEvent::SPAWN),
+ getPixelX(), getPixelY());
+ currentAction = SpriteAction::SPAWN;
}
if (currentAction != SpriteAction::INVALID)