Browse Source

Fix #379.

The `_sound_name` field does not include the channel suffix (eg `:L` and
`:R`), so this would explode when attempting to control a stereo sound
that has been split into mono channels.
pull/214/merge v0.15-beta2
Adam Johnson 7 months ago
parent
commit
fdd46f3c70
Signed by: Hoikas
GPG Key ID: 0B6515D6FF6F271E
  1. 2
      korman/properties/modifiers/sound.py

2
korman/properties/modifiers/sound.py

@ -688,7 +688,7 @@ class PlasmaSoundEmitter(PlasmaModifierProperties):
def get_sound_keys(self, exporter, name=None, sound=None) -> Iterator[Tuple[plKey, int]]:
assert name or sound
if sound is None:
sound = next((i for i in self.sounds if i._sound_name == name), None)
sound = next((i for i in self.sounds if i.name == name), None)
if sound is None:
raise ValueError(name)

Loading…
Cancel
Save