mirror of
https://github.com/glest/glest-source.git
synced 2025-02-24 19:52:25 +01:00
- slight change in loading factiontype (load by folder names not *. to avoid errors when garbage files exist)
This commit is contained in:
parent
8bbf398e70
commit
4e4825d752
@ -56,9 +56,12 @@ void FactionType::load(const string &dir, const TechTree *techTree, Checksum* ch
|
||||
|
||||
if(personalityType == fpt_Normal) {
|
||||
// a1) preload units
|
||||
string unitsPath= currentPath + "units/*.";
|
||||
//string unitsPath= currentPath + "units/*.";
|
||||
string unitsPath= currentPath + "units/";
|
||||
vector<string> unitFilenames;
|
||||
findAll(unitsPath, unitFilenames);
|
||||
//findAll(unitsPath, unitFilenames);
|
||||
findDirs(unitsPath, unitFilenames,false,false);
|
||||
|
||||
unitTypes.resize(unitFilenames.size());
|
||||
|
||||
for(int i = 0; i < unitTypes.size(); ++i) {
|
||||
@ -69,9 +72,12 @@ void FactionType::load(const string &dir, const TechTree *techTree, Checksum* ch
|
||||
}
|
||||
|
||||
// a2) preload upgrades
|
||||
string upgradesPath= currentPath + "upgrades/*.";
|
||||
//string upgradesPath= currentPath + "upgrades/*.";
|
||||
string upgradesPath= currentPath + "upgrades/";
|
||||
vector<string> upgradeFilenames;
|
||||
findAll(upgradesPath, upgradeFilenames, false, false);
|
||||
//findAll(upgradesPath, upgradeFilenames, false, false);
|
||||
findDirs(upgradesPath, upgradeFilenames,false,false);
|
||||
|
||||
upgradeTypes.resize(upgradeFilenames.size());
|
||||
for(int i = 0; i < upgradeTypes.size(); ++i) {
|
||||
string str= currentPath + "upgrades/" + upgradeFilenames[i];
|
||||
|
Loading…
x
Reference in New Issue
Block a user