From 128f6359e936bcdc5e26409ddd73438bce9c6dd6 Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Sun, 30 Jan 2022 22:40:53 +0000 Subject: Use virtual paths to specify exact mod to enable (#11784) --- src/server/mods.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/server/mods.cpp') 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"; -- cgit v1.2.3