diff options
Diffstat (limited to 'src/server')
-rw-r--r-- | src/server/mods.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/server/mods.cpp b/src/server/mods.cpp index ac4181e4d..0e9bf4911 100644 --- a/src/server/mods.cpp +++ b/src/server/mods.cpp @@ -94,7 +94,11 @@ void ServerModManager::getModNames(std::vector<std::string> &modlist) const void ServerModManager::getModsMediaPaths(std::vector<std::string> &paths) const { - for (const auto &spec : configuration.getMods()) { + // Iterate mods in reverse load order: Media loading expects higher priority media files first + // and mods loading later should be able to override media of already loaded mods + const auto mods = configuration.getMods(); + for (auto it = mods.crbegin(); it != mods.crend(); it++) { + const ModSpec &spec = *it; fs::GetRecursiveDirs(paths, spec.path + DIR_DELIM + "textures"); fs::GetRecursiveDirs(paths, spec.path + DIR_DELIM + "sounds"); fs::GetRecursiveDirs(paths, spec.path + DIR_DELIM + "media"); |