aboutsummaryrefslogtreecommitdiff
path: root/src/path_functions.cpp
diff options
context:
space:
mode:
authorin1tiate <radwoodward@vikings.grayson.edu>2021-07-22 12:26:57 -0500
committerin1tiate <radwoodward@vikings.grayson.edu>2021-07-22 12:26:57 -0500
commit2d3cab82c896b86b1e107b8e1773572ac0fec6d3 (patch)
treea0c665b5c644f169d249facc002431646e51a174 /src/path_functions.cpp
parent5190490a07f929aef3ee0198f5bce251ff28dbea (diff)
Fix custom objections not playing sounds
Diffstat (limited to 'src/path_functions.cpp')
-rw-r--r--src/path_functions.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/path_functions.cpp b/src/path_functions.cpp
index 2f5aaec4..61df1c60 100644
--- a/src/path_functions.cpp
+++ b/src/path_functions.cpp
@@ -264,7 +264,10 @@ QString AOApplication::get_real_suffixed_path(const VPath &vpath,
// Try cache first
QString phys_path = asset_lookup_cache.value(qHash(vpath));
if (!phys_path.isEmpty() && exists(phys_path)) {
- return phys_path;
+ for (const QString &suffix : suffixes) { // make sure cached asset is the right type
+ if (phys_path.endsWith(suffix, Qt::CaseInsensitive))
+ return phys_path;
+ }
}
// Cache miss; try each suffix on all known mount paths