File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
addons/source-python/packages/source-python/engines Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 3434# Paths
3535from paths import GAME_PATH
3636# Stringtables
37- from stringtables import string_tables
37+ from stringtables import INVALID_STRING_INDEX , string_tables
3838from stringtables .downloads import Downloadables
3939
4040
@@ -323,7 +323,7 @@ def is_precached(self):
323323
324324 :rtype: bool
325325 """
326- return self .sample in string_tables . soundprecache
326+ return string_tables . soundprecache [ self .sample ] != INVALID_STRING_INDEX
327327
328328
329329class StreamSound (_BaseSound ):
@@ -368,4 +368,5 @@ def is_precached(self):
368368
369369 :rtype: bool
370370 """
371- return self ._stream_sample in string_tables .soundprecache
371+ index = string_tables .soundprecache [self ._stream_sample ]
372+ return index != INVALID_STRING_INDEX
You can’t perform that action at this time.
0 commit comments