Fix for #30336: Couldn't playback from Python without having played back via logic bricks once.

Thanks Colin Nickerson for reporting.
This commit is contained in:
Joerg Mueller 2012-02-24 19:34:29 +00:00
parent 2377bfe32f
commit 697b494a30

@ -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;
}