diff options
| author | manuel <manuel@mausz.at> | 2011-04-09 01:09:16 +0200 |
|---|---|---|
| committer | manuel <manuel@mausz.at> | 2011-04-09 01:09:16 +0200 |
| commit | 8da57afa6d36af7fa94403cbde41f1305d611259 (patch) | |
| tree | 0fc8900c332b56c979003f3a93c6cf571ae6f8a7 /pacman-c++/actor.cpp | |
| parent | 42322689a9fad5c2ca2e4d4c9bffcea2b08c02b5 (diff) | |
| download | foop-8da57afa6d36af7fa94403cbde41f1305d611259.tar.gz foop-8da57afa6d36af7fa94403cbde41f1305d611259.tar.bz2 foop-8da57afa6d36af7fa94403cbde41f1305d611259.zip | |
fix move sound
Diffstat (limited to 'pacman-c++/actor.cpp')
| -rw-r--r-- | pacman-c++/actor.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/pacman-c++/actor.cpp b/pacman-c++/actor.cpp index 2b65528..a52be15 100644 --- a/pacman-c++/actor.cpp +++ b/pacman-c++/actor.cpp | |||
| @@ -106,11 +106,6 @@ void Actor::move(Actor::Movement direction) | |||
| 106 | if (isMoving()) | 106 | if (isMoving()) |
| 107 | return; | 107 | return; |
| 108 | 108 | ||
| 109 | if (m_local && AudioPlayer::self()->state() != Phonon::PlayingState) | ||
| 110 | { | ||
| 111 | AudioPlayer::self()->play(AudioPlayer::WakaWaka); | ||
| 112 | } | ||
| 113 | |||
| 114 | /* stop current animation */ | 109 | /* stop current animation */ |
| 115 | if (direction != m_direction) | 110 | if (direction != m_direction) |
| 116 | { | 111 | { |
| @@ -163,7 +158,13 @@ void Actor::move(Actor::Movement direction) | |||
| 163 | m_eating[direction]->start(); | 158 | m_eating[direction]->start(); |
| 164 | m_direction = direction; | 159 | m_direction = direction; |
| 165 | } | 160 | } |
| 166 | m_moving->start(); | 161 | |
| 162 | if (direction != Actor::None) | ||
| 163 | { | ||
| 164 | m_moving->start(); | ||
| 165 | if (m_local && AudioPlayer::self()->state() != Phonon::PlayingState) | ||
| 166 | AudioPlayer::self()->play(AudioPlayer::WakaWaka); | ||
| 167 | } | ||
| 167 | } | 168 | } |
| 168 | 169 | ||
| 169 | bool Actor::isMoving() | 170 | bool Actor::isMoving() |
