diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2019-09-01 16:02:23 +0200 |
---|---|---|
committer | Nikolay Korolev <nickvnuk@gmail.com> | 2019-09-01 16:02:23 +0200 |
commit | cd30a76dc58004fa47d6abab619d19718bcf3364 (patch) | |
tree | 544c4b74eb50bc56be44a9d5991ecc6b9cae5cc5 /src/control/Script.cpp | |
parent | Merge pull request #198 from ShFil119/audio6 (diff) | |
download | re3-cd30a76dc58004fa47d6abab619d19718bcf3364.tar re3-cd30a76dc58004fa47d6abab619d19718bcf3364.tar.gz re3-cd30a76dc58004fa47d6abab619d19718bcf3364.tar.bz2 re3-cd30a76dc58004fa47d6abab619d19718bcf3364.tar.lz re3-cd30a76dc58004fa47d6abab619d19718bcf3364.tar.xz re3-cd30a76dc58004fa47d6abab619d19718bcf3364.tar.zst re3-cd30a76dc58004fa47d6abab619d19718bcf3364.zip |
Diffstat (limited to '')
-rw-r--r-- | src/control/Script.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/control/Script.cpp b/src/control/Script.cpp index c81cd050..885d1d47 100644 --- a/src/control/Script.cpp +++ b/src/control/Script.cpp @@ -3493,12 +3493,15 @@ int8 CRunningScript::ProcessCommandsFrom300To399(int32 command) default: break; } +#ifdef FIX_BUGS + /* BUG: if audio is not initialized, this object will not be freed. */ + if (!DMAudio.IsAudioInitialised()) + return 0; +#endif cAudioScriptObject* obj = new cAudioScriptObject(); obj->Posn = *(CVector*)&ScriptParams[0]; obj->AudioId = ScriptParams[3]; obj->AudioEntity = AEHANDLE_NONE; - /* BUG: if audio is not initialized, this object will not be freed. */ - /* Issue needs to be addressed in CreateOneShotScriptObject. */ DMAudio.CreateOneShotScriptObject(obj); return 0; } |