diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-07-26 00:59:09 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-07-26 00:59:09 +0400 |
commit | 1b142434055e2b56b23991f0c9d695b6d4f33390 (patch) | |
tree | 8689574221e0d98697af406292b0383c14fc0c3b /source/gameengine/Ketsji/KX_SoundActuator.cpp | |
parent | dff9dce1cdcb5250797f529456649510d2396096 (diff) | |
parent | 1c00eacca2b084d7189de33cb75e8612cb542030 (diff) |
svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r20937:21899
missing commits from peter 20942, 21165, 21170, 21174, 21597
these files still need manual merging
source/blender/makesdna/DNA_sequence_types.h
source/blender/src/sequence.c
source/blender/src/seqeffects.c
source/blender/src/editseq.c
source/blender/include/BSE_sequence.h
Diffstat (limited to 'source/gameengine/Ketsji/KX_SoundActuator.cpp')
-rw-r--r-- | source/gameengine/Ketsji/KX_SoundActuator.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/source/gameengine/Ketsji/KX_SoundActuator.cpp b/source/gameengine/Ketsji/KX_SoundActuator.cpp index 673f42283dd..39381182944 100644 --- a/source/gameengine/Ketsji/KX_SoundActuator.cpp +++ b/source/gameengine/Ketsji/KX_SoundActuator.cpp @@ -104,7 +104,8 @@ bool KX_SoundActuator::Update(double curtime, bool frame) // do nothing on negative events, otherwise sounds are played twice! bool bNegativeEvent = IsNegativeEvent(); - + bool bPositiveEvent = m_posevent; + RemoveAllEvents(); if (!m_soundObject) @@ -153,8 +154,17 @@ bool KX_SoundActuator::Update(double curtime, bool frame) // remember that we tried to stop the actuator m_isplaying = false; } - else - { + +#if 1 + // Warning: when de-activating the actuator, after a single negative event this runs again with... + // m_posevent==false && m_posevent==false, in this case IsNegativeEvent() returns false + // and assumes this is a positive event. + // check that we actually have a positive event so as not to play sounds when being disabled. + else if(bPositiveEvent) { // <- added since 2.49 +#else + else { // <- works in most cases except a loop-end sound will never stop unless + // the negative pulse is done continuesly +#endif if (!m_isplaying) { switch (m_type) |