]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/mods.cpp
build with ogles2 driver
[dragonfireclient.git] / src / mods.cpp
index 9e3c7d5d72f4d957ea3ba3414418cde73fb03026..ac2d9b17d666218a6e0c97aaa7275245f01802e4 100644 (file)
@@ -1,6 +1,6 @@
 /*
-Minetest-c55
-Copyright (C) 2011 celeron55, Perttu Ahola <celeron55@gmail.com>
+Minetest
+Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 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<std::string, ModSpec> 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<std::string, ModSpec> flattenModTree(std::map<std::string, ModSpec> mod
                it != mods.end(); ++it)
        {
                ModSpec mod = (*it).second;
-               if(!mod.modpack_content.empty()) //is a modpack
+               if(mod.is_modpack)
                {
                        std::map<std::string, ModSpec> content = 
                                flattenModTree(mod.modpack_content);
@@ -98,7 +99,7 @@ std::vector<ModSpec> flattenMods(std::map<std::string, ModSpec> mods)
                it != mods.end(); ++it)
        {
                ModSpec mod = (*it).second;
-               if(!mod.modpack_content.empty()) //is a modpack
+               if(mod.is_modpack)
                {
                        std::vector<ModSpec> content = flattenMods(mod.modpack_content);
                        result.reserve(result.size() + content.size());