From 2d3cab82c896b86b1e107b8e1773572ac0fec6d3 Mon Sep 17 00:00:00 2001 From: in1tiate Date: Thu, 22 Jul 2021 12:26:57 -0500 Subject: Fix custom objections not playing sounds --- src/path_functions.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/path_functions.cpp') 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 -- cgit