summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-05-17 07:06:34 +0200
committerSergeanur <s.anureev@yandex.ua>2021-05-17 07:06:34 +0200
commitbd70540b53b7d0a32db0d25b631634fcb0488d0c (patch)
tree291abe762e39cb87f03863f5be665a2c9343290b
parentMerge branch 'miami' into lcs (diff)
parentFix oneshot audio crash (diff)
downloadre3-bd70540b53b7d0a32db0d25b631634fcb0488d0c.tar
re3-bd70540b53b7d0a32db0d25b631634fcb0488d0c.tar.gz
re3-bd70540b53b7d0a32db0d25b631634fcb0488d0c.tar.bz2
re3-bd70540b53b7d0a32db0d25b631634fcb0488d0c.tar.lz
re3-bd70540b53b7d0a32db0d25b631634fcb0488d0c.tar.xz
re3-bd70540b53b7d0a32db0d25b631634fcb0488d0c.tar.zst
re3-bd70540b53b7d0a32db0d25b631634fcb0488d0c.zip
-rw-r--r--src/audio/AudioScriptObject.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/audio/AudioScriptObject.cpp b/src/audio/AudioScriptObject.cpp
index ac30f757..7dbc1ad0 100644
--- a/src/audio/AudioScriptObject.cpp
+++ b/src/audio/AudioScriptObject.cpp
@@ -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;