- added techtrees for file xfer and CRC checking (might need to turn off etc later but lets test for now)

This commit is contained in:
Mark Vejvoda
2011-03-09 23:09:32 +00:00
parent 5f9e8d97d3
commit 63da3d7af2
8 changed files with 402 additions and 28 deletions

View File

@@ -93,10 +93,20 @@ ServerInterface::ServerInterface() :GameNetworkInterface() {
}
}
std::pair<string,string> techtreesPath;
vector<string> techtreesList = Config::getInstance().getPathListForType(ptTechs);
if(techtreesList.size() > 0) {
techtreesPath.first = techtreesList[0];
if(techtreesList.size() > 1) {
techtreesPath.second = techtreesList[1];
}
}
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
int portNumber = Config::getInstance().getInt("FTPServerPort",intToStr(ServerSocket::getFTPServerPort()).c_str());
ServerSocket::setFTPServerPort(portNumber);
ftpServer = new FTPServerThread(mapsPath,tilesetsPath,portNumber,GameConstants::maxPlayers,this);
ftpServer = new FTPServerThread(mapsPath,tilesetsPath,techtreesPath,
portNumber,GameConstants::maxPlayers,this);
ftpServer->start();
}
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);