mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Fix media overriding regression (#12602)
This commit is contained in:
parent
6611d7e1ee
commit
99c8295e71
2 changed files with 13 additions and 1 deletions
|
@ -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");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue