From 56c2fdd054e66059bae881dfd6763b186c4e7683 Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Mon, 28 Sep 2020 12:24:28 -0400 Subject: [PATCH] Fix issue with static sounds not playing in PotS. --- korman/properties/modifiers/sound.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/korman/properties/modifiers/sound.py b/korman/properties/modifiers/sound.py index 00f289a..71b37fd 100644 --- a/korman/properties/modifiers/sound.py +++ b/korman/properties/modifiers/sound.py @@ -189,9 +189,13 @@ class PlasmaSound(idprops.IDPropMixin, bpy.types.PropertyGroup): exporter.output.add_sfx(self._sound) # There is some bug in the MOUL code that causes a crash if this does not match the expected - # result. There's no sense in debugging that though--the user should never specify - # streaming vs static. That's an implementation detail. - pClass = plWin32StreamingSound if length > 4.0 else plWin32StaticSound + # result. Worse, PotS seems to not like static sounds that are brand-new to it. Possibly because + # it needs to be decompressed outside of game. There's no sense in debugging any of that + # though--the user should never specify streaming vs static. That's an implementation detail. + if exporter.mgr.getVer() != pvMoul and self._sound.plasma_sound.package: + pClass = plWin32StreamingSound + else: + pClass = plWin32StreamingSound if length > 4.0 else plWin32StaticSound # OK. Any Plasma engine that uses OpenAL (MOUL) is subject to this restriction. # 3D Positional audio MUST... and I mean MUST... have mono emitters.