Bugfixes:

- final network fixes for mega-glest multiplayer performance improvements
- added ability for windows builds to "ignore" hidden files so that glest wont try to read svn files
- bugfix for loading the map editor
This commit is contained in:
Mark Vejvoda
2010-02-15 17:07:21 +00:00
parent ca20784740
commit 012644273e
8 changed files with 1518 additions and 1454 deletions

View File

@@ -252,7 +252,7 @@ END_EVENT_TABLE()
// =====================================================
GlCanvas::GlCanvas(MainWindow * mainWindow):
wxGLCanvas(mainWindow, -1)
wxGLCanvas(mainWindow, -1, wxDefaultPosition)
{
this->mainWindow = mainWindow;
}

View File

@@ -85,6 +85,16 @@ void FactionType::load(const string &dir, const TechTree *techTree, Checksum* ch
//open xml file
string path= dir+"/"+name+".xml";
#ifdef _WINDOWS
DWORD fileAttributes = GetFileAttributes(path.c_str());
if( (fileAttributes & FILE_ATTRIBUTE_HIDDEN) == FILE_ATTRIBUTE_HIDDEN)
{
return;
}
#endif
checksum->addFile(path);
XmlTree xmlTree;

View File

@@ -42,6 +42,16 @@ void ResourceType::load(const string &dir, Checksum* checksum){
Logger::getInstance().add("Resource type: "+ formatString(name), true);
path= dir+"/"+name+".xml";
#ifdef _WINDOWS
DWORD fileAttributes = GetFileAttributes(path.c_str());
if( (fileAttributes & FILE_ATTRIBUTE_HIDDEN) == FILE_ATTRIBUTE_HIDDEN)
{
return;
}
#endif
checksum->addFile(path);
//tree

View File

@@ -60,6 +60,19 @@ void TechTree::load(const string &dir, set<string> &factions, Checksum* checksum
XmlTree xmlTree;
string path= dir+"/"+lastDir(dir)+".xml";
bool bCanProcessFile = true;
#ifdef _WINDOWS
DWORD fileAttributes = GetFileAttributes(path.c_str());
if( (fileAttributes & FILE_ATTRIBUTE_HIDDEN) == FILE_ATTRIBUTE_HIDDEN)
{
bCanProcessFile = false;
}
#endif
if(bCanProcessFile == true)
{
checksum->addFile(path);
xmlTree.load(path);
@@ -94,6 +107,7 @@ void TechTree::load(const string &dir, set<string> &factions, Checksum* checksum
damageMultiplierTable.setDamageMultiplier(attackType, armorType, multiplier);
}
}
}
catch(const exception &e){
throw runtime_error("Error loading Tech Tree: "+ dir + "\n" + e.what());
}

View File

@@ -94,6 +94,16 @@ void UnitType::load(int id,const string &dir, const TechTree *techTree, const Fa
//file load
path= dir+"/"+name+".xml";
#ifdef _WINDOWS
DWORD fileAttributes = GetFileAttributes(path.c_str());
if( (fileAttributes & FILE_ATTRIBUTE_HIDDEN) == FILE_ATTRIBUTE_HIDDEN)
{
return;
}
#endif
checksum->addFile(path);
XmlTree xmlTree;

View File

@@ -54,6 +54,16 @@ void UpgradeType::load(const string &dir, const TechTree *techTree, const Factio
path=dir+"/"+name+".xml";
#ifdef _WINDOWS
DWORD fileAttributes = GetFileAttributes(path.c_str());
if( (fileAttributes & FILE_ATTRIBUTE_HIDDEN) == FILE_ATTRIBUTE_HIDDEN)
{
return;
}
#endif
try{
checksum->addFile(path);

View File

@@ -96,6 +96,16 @@ void Tileset::load(const string &dir, Checksum *checksum){
string name= lastDir(dir);
string path= dir+"/"+name+".xml";
#ifdef _WINDOWS
DWORD fileAttributes = GetFileAttributes(path.c_str());
if( (fileAttributes & FILE_ATTRIBUTE_HIDDEN) == FILE_ATTRIBUTE_HIDDEN)
{
return;
}
#endif
checksum->addFile(path);
try{