diff options
author | rubenwardy <rw@rubenwardy.com> | 2022-01-30 22:40:53 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-30 22:40:53 +0000 |
commit | 128f6359e936bcdc5e26409ddd73438bce9c6dd6 (patch) | |
tree | f4d396d479ae17f57f25ab78df300256e28d5945 /src/server/mods.cpp | |
parent | 8c0331d2449cf71049c7ce9c06d141e2846ebcb0 (diff) | |
download | minetest-128f6359e936bcdc5e26409ddd73438bce9c6dd6.tar.gz minetest-128f6359e936bcdc5e26409ddd73438bce9c6dd6.tar.bz2 minetest-128f6359e936bcdc5e26409ddd73438bce9c6dd6.zip |
Use virtual paths to specify exact mod to enable (#11784)
Diffstat (limited to 'src/server/mods.cpp')
-rw-r--r-- | src/server/mods.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/server/mods.cpp b/src/server/mods.cpp index 609d8c346..ba76d4746 100644 --- a/src/server/mods.cpp +++ b/src/server/mods.cpp @@ -41,8 +41,10 @@ ServerModManager::ServerModManager(const std::string &worldpath) : SubgameSpec gamespec = findWorldSubgame(worldpath); // Add all game mods and all world mods - addModsInPath(gamespec.gamemods_path); - addModsInPath(worldpath + DIR_DELIM + "worldmods"); + std::string game_virtual_path; + game_virtual_path.append("games/").append(gamespec.id).append("/mods"); + addModsInPath(gamespec.gamemods_path, game_virtual_path); + addModsInPath(worldpath + DIR_DELIM + "worldmods", "worldmods"); // Load normal mods std::string worldmt = worldpath + DIR_DELIM + "world.mt"; |