Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoerg Mueller <nexyon@gmail.com>2012-02-24 23:34:29 +0400
committerJoerg Mueller <nexyon@gmail.com>2012-02-24 23:34:29 +0400
commit697b494a30f8b17090b347ca99a86b93fd6a6319 (patch)
tree9bfccae54b32b79d5ce4d4a0f2d0900fb7f26129 /source/gameengine
parent2377bfe32f58a9fbdc9466a7b3f8433f94e94922 (diff)
Fix for #30336: Couldn't playback from Python without having played back via logic bricks once.
Thanks Colin Nickerson for reporting.
Diffstat (limited to 'source/gameengine')
-rw-r--r--source/gameengine/Ketsji/KX_SoundActuator.cpp19
1 files changed, 8 insertions, 11 deletions
diff --git a/source/gameengine/Ketsji/KX_SoundActuator.cpp b/source/gameengine/Ketsji/KX_SoundActuator.cpp
index c47c45df4ac..5c4cb7216dd 100644
--- a/source/gameengine/Ketsji/KX_SoundActuator.cpp
+++ b/source/gameengine/Ketsji/KX_SoundActuator.cpp
@@ -325,18 +325,15 @@ KX_PYMETHODDEF_DOC_NOARGS(KX_SoundActuator, startSound,
"startSound()\n"
"\tStarts the sound.\n")
{
- if(!m_handle.isNull())
+ switch(m_handle.isNull() ? AUD_STATUS_INVALID : m_handle->getStatus())
{
- switch(m_handle->getStatus())
- {
- case AUD_STATUS_PLAYING:
- break;
- case AUD_STATUS_PAUSED:
- m_handle->resume();
- break;
- default:
- play();
- }
+ case AUD_STATUS_PLAYING:
+ break;
+ case AUD_STATUS_PAUSED:
+ m_handle->resume();
+ break;
+ default:
+ play();
}
Py_RETURN_NONE;
}