We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b94fd63 commit 1a01db3Copy full SHA for 1a01db3
addons/source-python/packages/source-python/engines/sound.py
@@ -34,7 +34,7 @@
34
# Paths
35
from paths import GAME_PATH
36
# Stringtables
37
-from stringtables import string_tables
+from stringtables import INVALID_STRING_INDEX, string_tables
38
from stringtables.downloads import Downloadables
39
40
@@ -323,7 +323,7 @@ def is_precached(self):
323
324
:rtype: bool
325
"""
326
- return self.sample in string_tables.soundprecache
+ return string_tables.soundprecache[self.sample] != INVALID_STRING_INDEX
327
328
329
class StreamSound(_BaseSound):
@@ -368,4 +368,5 @@ def is_precached(self):
368
369
370
371
- return self._stream_sample in string_tables.soundprecache
+ index = string_tables.soundprecache[self._stream_sample]
372
+ return index != INVALID_STRING_INDEX
0 commit comments