diff options
author | Sergeanur <s.anureev@yandex.ua> | 2021-05-17 07:06:34 +0200 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2021-05-17 07:06:34 +0200 |
commit | bd70540b53b7d0a32db0d25b631634fcb0488d0c (patch) | |
tree | 291abe762e39cb87f03863f5be665a2c9343290b | |
parent | Merge branch 'miami' into lcs (diff) | |
parent | Fix oneshot audio crash (diff) | |
download | re3-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.cpp | 2 |
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; |