Fix oneshot audio crash

This commit is contained in:
Sergeanur 2021-05-17 08:06:05 +03:00
parent 8a728faeb6
commit 3a7cb9c5ce

View File

@ -90,6 +90,8 @@ cAudioScriptObject::SaveAllAudioScriptObjects(uint8 *buf, uint32 *size)
void
PlayOneShotScriptObject(uint8 id, CVector const &pos)
{
if (!DMAudio.IsAudioInitialised()) return;
cAudioScriptObject *audioScriptObject = new cAudioScriptObject();
audioScriptObject->Posn = pos;
audioScriptObject->AudioId = id;