X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Fmods.cpp;h=ac2d9b17d666218a6e0c97aaa7275245f01802e4;hb=10c03e1a9d09ba0369ea3fbff1ec3a9436a3b706;hp=9e3c7d5d72f4d957ea3ba3414418cde73fb03026;hpb=6af8a34d91582ce15a0341e75d3e55d847a5a47a;p=dragonfireclient.git diff --git a/src/mods.cpp b/src/mods.cpp index 9e3c7d5d7..ac2d9b17d 100644 --- a/src/mods.cpp +++ b/src/mods.cpp @@ -1,6 +1,6 @@ /* -Minetest-c55 -Copyright (C) 2011 celeron55, Perttu Ahola +Minetest +Copyright (C) 2013 celeron55, Perttu Ahola This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -46,6 +46,7 @@ std::map getModsInPath(std::string path) modpack_is.close(); // We don't actually need the file ModSpec spec(modname,modpath); spec.modpack_content = getModsInPath(modpath); + spec.is_modpack = true; result.insert(std::make_pair(modname,spec)); } else // not a modpack, add the modspec @@ -76,7 +77,7 @@ std::map flattenModTree(std::map mod it != mods.end(); ++it) { ModSpec mod = (*it).second; - if(!mod.modpack_content.empty()) //is a modpack + if(mod.is_modpack) { std::map content = flattenModTree(mod.modpack_content); @@ -98,7 +99,7 @@ std::vector flattenMods(std::map mods) it != mods.end(); ++it) { ModSpec mod = (*it).second; - if(!mod.modpack_content.empty()) //is a modpack + if(mod.is_modpack) { std::vector content = flattenMods(mod.modpack_content); result.reserve(result.size() + content.size());