summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-05-17 07:06:05 +0200
committerSergeanur <s.anureev@yandex.ua>2021-05-17 07:06:05 +0200
commit3a7cb9c5ce73ff214a6c217e1a88640860d3c997 (patch)
tree8259d89007e9d3ec0797a3b5a9f27488f93174c8
parentFixes to sfx names (diff)
downloadre3-3a7cb9c5ce73ff214a6c217e1a88640860d3c997.tar
re3-3a7cb9c5ce73ff214a6c217e1a88640860d3c997.tar.gz
re3-3a7cb9c5ce73ff214a6c217e1a88640860d3c997.tar.bz2
re3-3a7cb9c5ce73ff214a6c217e1a88640860d3c997.tar.lz
re3-3a7cb9c5ce73ff214a6c217e1a88640860d3c997.tar.xz
re3-3a7cb9c5ce73ff214a6c217e1a88640860d3c997.tar.zst
re3-3a7cb9c5ce73ff214a6c217e1a88640860d3c997.zip
Diffstat (limited to '')
-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;