mirror of
https://github.com/glest/glest-source.git
synced 2025-08-21 15:41:24 +02:00
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:
@@ -252,7 +252,7 @@ END_EVENT_TABLE()
|
|||||||
// =====================================================
|
// =====================================================
|
||||||
|
|
||||||
GlCanvas::GlCanvas(MainWindow * mainWindow):
|
GlCanvas::GlCanvas(MainWindow * mainWindow):
|
||||||
wxGLCanvas(mainWindow, -1)
|
wxGLCanvas(mainWindow, -1, wxDefaultPosition)
|
||||||
{
|
{
|
||||||
this->mainWindow = mainWindow;
|
this->mainWindow = mainWindow;
|
||||||
}
|
}
|
||||||
|
@@ -85,6 +85,16 @@ void FactionType::load(const string &dir, const TechTree *techTree, Checksum* ch
|
|||||||
//open xml file
|
//open xml file
|
||||||
string path= dir+"/"+name+".xml";
|
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);
|
checksum->addFile(path);
|
||||||
|
|
||||||
XmlTree xmlTree;
|
XmlTree xmlTree;
|
||||||
|
@@ -42,6 +42,16 @@ void ResourceType::load(const string &dir, Checksum* checksum){
|
|||||||
Logger::getInstance().add("Resource type: "+ formatString(name), true);
|
Logger::getInstance().add("Resource type: "+ formatString(name), true);
|
||||||
path= dir+"/"+name+".xml";
|
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);
|
checksum->addFile(path);
|
||||||
|
|
||||||
//tree
|
//tree
|
||||||
|
@@ -60,6 +60,19 @@ void TechTree::load(const string &dir, set<string> &factions, Checksum* checksum
|
|||||||
XmlTree xmlTree;
|
XmlTree xmlTree;
|
||||||
string path= dir+"/"+lastDir(dir)+".xml";
|
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);
|
checksum->addFile(path);
|
||||||
|
|
||||||
xmlTree.load(path);
|
xmlTree.load(path);
|
||||||
@@ -94,6 +107,7 @@ void TechTree::load(const string &dir, set<string> &factions, Checksum* checksum
|
|||||||
damageMultiplierTable.setDamageMultiplier(attackType, armorType, multiplier);
|
damageMultiplierTable.setDamageMultiplier(attackType, armorType, multiplier);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
catch(const exception &e){
|
catch(const exception &e){
|
||||||
throw runtime_error("Error loading Tech Tree: "+ dir + "\n" + e.what());
|
throw runtime_error("Error loading Tech Tree: "+ dir + "\n" + e.what());
|
||||||
}
|
}
|
||||||
|
@@ -94,6 +94,16 @@ void UnitType::load(int id,const string &dir, const TechTree *techTree, const Fa
|
|||||||
//file load
|
//file load
|
||||||
path= dir+"/"+name+".xml";
|
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);
|
checksum->addFile(path);
|
||||||
|
|
||||||
XmlTree xmlTree;
|
XmlTree xmlTree;
|
||||||
|
@@ -54,6 +54,16 @@ void UpgradeType::load(const string &dir, const TechTree *techTree, const Factio
|
|||||||
|
|
||||||
path=dir+"/"+name+".xml";
|
path=dir+"/"+name+".xml";
|
||||||
|
|
||||||
|
#ifdef _WINDOWS
|
||||||
|
|
||||||
|
DWORD fileAttributes = GetFileAttributes(path.c_str());
|
||||||
|
if( (fileAttributes & FILE_ATTRIBUTE_HIDDEN) == FILE_ATTRIBUTE_HIDDEN)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
try{
|
try{
|
||||||
checksum->addFile(path);
|
checksum->addFile(path);
|
||||||
|
|
||||||
|
@@ -96,6 +96,16 @@ void Tileset::load(const string &dir, Checksum *checksum){
|
|||||||
string name= lastDir(dir);
|
string name= lastDir(dir);
|
||||||
string path= dir+"/"+name+".xml";
|
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);
|
checksum->addFile(path);
|
||||||
|
|
||||||
try{
|
try{
|
||||||
|
Reference in New Issue
Block a user