diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-06-11 14:26:53 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-06-11 14:26:53 +0400 |
commit | a543a1549e32a29a259603994e938ee5597d2bbb (patch) | |
tree | 6af89576697028cfe3616f80a641f08d428c5827 /source/gameengine/Ketsji/KX_SoundActuator.cpp | |
parent | 5a8b389ebe6105149625e7367ac533ca258c3970 (diff) |
Sound actuator bug reported by zapman on blenderartist.
Negative events would play on an actuator if it hadn't played a sound yet.
Diffstat (limited to 'source/gameengine/Ketsji/KX_SoundActuator.cpp')
-rw-r--r-- | source/gameengine/Ketsji/KX_SoundActuator.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/gameengine/Ketsji/KX_SoundActuator.cpp b/source/gameengine/Ketsji/KX_SoundActuator.cpp index 5c02a2db646..c13271f66a5 100644 --- a/source/gameengine/Ketsji/KX_SoundActuator.cpp +++ b/source/gameengine/Ketsji/KX_SoundActuator.cpp @@ -112,7 +112,7 @@ bool KX_SoundActuator::Update(double curtime, bool frame) return false; // actual audio device playing state - bool isplaying = (m_soundObject->GetPlaystate() != SND_STOPPED) ? true : false; + bool isplaying = (m_soundObject->GetPlaystate() != SND_STOPPED && m_soundObject->GetPlaystate() != SND_INITIAL) ? true : false; if (m_pino) { @@ -194,7 +194,7 @@ bool KX_SoundActuator::Update(double curtime, bool frame) } } // verify that the sound is still playing - isplaying = (m_soundObject->GetPlaystate() != SND_STOPPED) ? true : false; + isplaying = (m_soundObject->GetPlaystate() != SND_STOPPED && m_soundObject->GetPlaystate() != SND_INITIAL) ? true : false; if (isplaying) { |