From 50621ffe851223fb791d4ba47959585154d59d3f Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Tue, 20 Mar 2012 01:06:44 +0200 Subject: Fix mod paths --- src/subgame.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/subgame.cpp') diff --git a/src/subgame.cpp b/src/subgame.cpp index e55f1bc97..3d4480ebf 100644 --- a/src/subgame.cpp +++ b/src/subgame.cpp @@ -38,14 +38,16 @@ SubgameSpec findSubgame(const std::string &id) } if(!fs::PathExists(game_path)) return SubgameSpec(); - // Find addon directories - std::set addon_paths; + // Find mod directories + std::set mods_paths; + mods_paths.insert(game_path + DIR_DELIM + "mods"); if(!user_game) - addon_paths.insert(share + DIR_DELIM + "addons" + DIR_DELIM + id); - addon_paths.insert(user + DIR_DELIM + "addons" + DIR_DELIM + id); + mods_paths.insert(share + DIR_DELIM + "mods" + DIR_DELIM + id); + if(user != share || user_game) + mods_paths.insert(user + DIR_DELIM + "mods" + DIR_DELIM + id); // TODO: Read proper name from game_path/game.conf std::string game_name = id; - return SubgameSpec(id, game_path, addon_paths, game_name); + return SubgameSpec(id, game_path, mods_paths, game_name); } std::set getAvailableGameIds() -- cgit v1.2.3