mirror of
https://github.com/glest/glest-source.git
synced 2025-09-30 17:39:02 +02:00
renamed ServerPort->PortServer MasterServerExternalPort->PortExternal
This commit is contained in:
@@ -64,11 +64,13 @@ MasterServerExternalPortList=61357,61367,61377,61387,61397,80,1080,8000,8080,443
|
|||||||
NetPlayerName=newbie
|
NetPlayerName=newbie
|
||||||
NetworkConsistencyChecks=true
|
NetworkConsistencyChecks=true
|
||||||
PhotoMode=false
|
PhotoMode=false
|
||||||
|
PortExternal=0
|
||||||
|
PortList=61357,61367,61377,61387,61397
|
||||||
|
PortServer=61357
|
||||||
RefreshFrequency=75
|
RefreshFrequency=75
|
||||||
ScreenHeight=600
|
ScreenHeight=600
|
||||||
ScreenWidth=800
|
ScreenWidth=800
|
||||||
ServerIp=192.168.0.107
|
ServerIp=192.168.0.107
|
||||||
ServerPort=61357
|
|
||||||
ShadowAlpha=0.2
|
ShadowAlpha=0.2
|
||||||
ShadowFrameSkip=2
|
ShadowFrameSkip=2
|
||||||
ShadowTextureSize=512
|
ShadowTextureSize=512
|
||||||
|
@@ -3274,8 +3274,8 @@ int glestMain(int argc, char** argv) {
|
|||||||
|
|
||||||
printf("Forcing internal port# %d, external port# %d\n",internalPort,externalPort);
|
printf("Forcing internal port# %d, external port# %d\n",internalPort,externalPort);
|
||||||
|
|
||||||
config.setInt("ServerPort",internalPort,true);
|
config.setInt("PortServer",internalPort,true);
|
||||||
config.setInt("MasterServerExternalPort",externalPort,true);
|
config.setInt("PortExternal",externalPort,true);
|
||||||
config.setInt("FTPServerPort",internalPort+1,true);
|
config.setInt("FTPServerPort",internalPort+1,true);
|
||||||
|
|
||||||
if(paramPartPortsTokens.size() >= 3 && paramPartPortsTokens[2].length() > 0) {
|
if(paramPartPortsTokens.size() >= 3 && paramPartPortsTokens[2].length() > 0) {
|
||||||
@@ -4360,7 +4360,7 @@ int glestMain(int argc, char** argv) {
|
|||||||
if(paramPartTokens.size() >= 2 && paramPartTokens[1].length() > 0) {
|
if(paramPartTokens.size() >= 2 && paramPartTokens[1].length() > 0) {
|
||||||
string autoConnectServer = paramPartTokens[1];
|
string autoConnectServer = paramPartTokens[1];
|
||||||
|
|
||||||
int port = config.getInt("ServerPort",intToStr(GameConstants::serverPort).c_str());
|
int port = config.getInt("PortServer",intToStr(GameConstants::serverPort).c_str());
|
||||||
vector<string> paramPartTokens2;
|
vector<string> paramPartTokens2;
|
||||||
Tokenize(autoConnectServer,paramPartTokens2,":");
|
Tokenize(autoConnectServer,paramPartTokens2,":");
|
||||||
autoConnectServer = paramPartTokens2[0];
|
autoConnectServer = paramPartTokens2[0];
|
||||||
|
@@ -201,8 +201,8 @@ MenuStateCustomGame::MenuStateCustomGame(Program *program, MainMenu *mainMenu,
|
|||||||
ipText += ip;
|
ipText += ip;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
string externalPort=config.getString("MasterServerExternalPort", intToStr(GameConstants::serverPort).c_str());
|
string externalPort=config.getString("PortExternal", intToStr(GameConstants::serverPort).c_str());
|
||||||
string serverPort=config.getString("ServerPort", intToStr(GameConstants::serverPort).c_str());
|
string serverPort=config.getString("PortServer", intToStr(GameConstants::serverPort).c_str());
|
||||||
labelLocalIP.setText(lang.get("LanIP") + ipText + " ( "+serverPort+" / "+externalPort+" )");
|
labelLocalIP.setText(lang.get("LanIP") + ipText + " ( "+serverPort+" / "+externalPort+" )");
|
||||||
ServerSocket::setExternalPort(strToInt(externalPort));
|
ServerSocket::setExternalPort(strToInt(externalPort));
|
||||||
|
|
||||||
@@ -738,8 +738,8 @@ void MenuStateCustomGame::reloadUI() {
|
|||||||
ipText += ip;
|
ipText += ip;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
string externalPort=config.getString("MasterServerExternalPort", intToStr(GameConstants::serverPort).c_str());
|
string externalPort=config.getString("PortExternal", intToStr(GameConstants::serverPort).c_str());
|
||||||
string serverPort=config.getString("ServerPort", intToStr(GameConstants::serverPort).c_str());
|
string serverPort=config.getString("PortServer", intToStr(GameConstants::serverPort).c_str());
|
||||||
labelLocalIP.setText(lang.get("LanIP") + ipText + " ( "+serverPort+" / "+externalPort+" )");
|
labelLocalIP.setText(lang.get("LanIP") + ipText + " ( "+serverPort+" / "+externalPort+" )");
|
||||||
|
|
||||||
labelMap.setText(lang.get("Map")+":");
|
labelMap.setText(lang.get("Map")+":");
|
||||||
@@ -2477,7 +2477,7 @@ void MenuStateCustomGame::update() {
|
|||||||
labelNetStatus[i].setText(szBuf);
|
labelNetStatus[i].setText(szBuf);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
string port = intToStr(config.getInt("ServerPort"));
|
string port = intToStr(config.getInt("PortServer"));
|
||||||
if(port != intToStr(GameConstants::serverPort)){
|
if(port != intToStr(GameConstants::serverPort)){
|
||||||
port = port + " " + lang.get("NonStandardPort") + "!)";
|
port = port + " " + lang.get("NonStandardPort") + "!)";
|
||||||
}
|
}
|
||||||
@@ -2859,7 +2859,7 @@ void MenuStateCustomGame::publishToMasterserver() {
|
|||||||
publishToServerInfo["networkSlots"] = intToStr(slotCountHumans);
|
publishToServerInfo["networkSlots"] = intToStr(slotCountHumans);
|
||||||
publishToServerInfo["connectedClients"] = intToStr(slotCountConnectedPlayers);
|
publishToServerInfo["connectedClients"] = intToStr(slotCountConnectedPlayers);
|
||||||
|
|
||||||
string externalport = config.getString("MasterServerExternalPort", intToStr(GameConstants::serverPort).c_str());
|
string externalport = config.getString("PortExternal", intToStr(GameConstants::serverPort).c_str());
|
||||||
publishToServerInfo["externalconnectport"] = externalport;
|
publishToServerInfo["externalconnectport"] = externalport;
|
||||||
publishToServerInfo["privacyPlease"] = intToStr(config.getBool("PrivacyPlease","false"));
|
publishToServerInfo["privacyPlease"] = intToStr(config.getBool("PrivacyPlease","false"));
|
||||||
|
|
||||||
|
@@ -146,7 +146,7 @@ void MenuStateJoinGame::CommonInit(bool connect, Ip serverIp,int portNumberOverr
|
|||||||
labelServerPort.init(465,430);
|
labelServerPort.init(465,430);
|
||||||
|
|
||||||
string host = labelServerIp.getText();
|
string host = labelServerIp.getText();
|
||||||
int portNumber = config.getInt("ServerPort",intToStr(GameConstants::serverPort).c_str());
|
int portNumber = config.getInt("PortServer",intToStr(GameConstants::serverPort).c_str());
|
||||||
std::vector<std::string> hostPartsList;
|
std::vector<std::string> hostPartsList;
|
||||||
Tokenize(host,hostPartsList,":");
|
Tokenize(host,hostPartsList,":");
|
||||||
if(hostPartsList.size() > 1) {
|
if(hostPartsList.size() > 1) {
|
||||||
@@ -156,7 +156,7 @@ void MenuStateJoinGame::CommonInit(bool connect, Ip serverIp,int portNumberOverr
|
|||||||
}
|
}
|
||||||
|
|
||||||
string port = intToStr(portNumber);
|
string port = intToStr(portNumber);
|
||||||
if(port != intToStr(config.getInt("ServerPort",intToStr(GameConstants::serverPort).c_str()))) {
|
if(port != intToStr(config.getInt("PortServer",intToStr(GameConstants::serverPort).c_str()))) {
|
||||||
port = port + " (" + lang.get("NonStandardPort") + ")";
|
port = port + " (" + lang.get("NonStandardPort") + ")";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -196,7 +196,7 @@ void MenuStateJoinGame::CommonInit(bool connect, Ip serverIp,int portNumberOverr
|
|||||||
}
|
}
|
||||||
|
|
||||||
host = labelServerIp.getText();
|
host = labelServerIp.getText();
|
||||||
portNumber = config.getInt("ServerPort",intToStr(GameConstants::serverPort).c_str());
|
portNumber = config.getInt("PortServer",intToStr(GameConstants::serverPort).c_str());
|
||||||
hostPartsList.clear();
|
hostPartsList.clear();
|
||||||
Tokenize(host,hostPartsList,":");
|
Tokenize(host,hostPartsList,":");
|
||||||
if(hostPartsList.size() > 1) {
|
if(hostPartsList.size() > 1) {
|
||||||
@@ -206,7 +206,7 @@ void MenuStateJoinGame::CommonInit(bool connect, Ip serverIp,int portNumberOverr
|
|||||||
}
|
}
|
||||||
|
|
||||||
port = intToStr(portNumber);
|
port = intToStr(portNumber);
|
||||||
if(port != intToStr(config.getInt("ServerPort",intToStr(GameConstants::serverPort).c_str()))) {
|
if(port != intToStr(config.getInt("PortServer",intToStr(GameConstants::serverPort).c_str()))) {
|
||||||
port = port + " (" + lang.get("NonStandardPort") + ")";
|
port = port + " (" + lang.get("NonStandardPort") + ")";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -242,7 +242,7 @@ void MenuStateJoinGame::reloadUI() {
|
|||||||
labelServerPortLabel.setText(lang.get("ServerPort"));
|
labelServerPortLabel.setText(lang.get("ServerPort"));
|
||||||
|
|
||||||
string host = labelServerIp.getText();
|
string host = labelServerIp.getText();
|
||||||
int portNumber = config.getInt("ServerPort",intToStr(GameConstants::serverPort).c_str());
|
int portNumber = config.getInt("PortServer",intToStr(GameConstants::serverPort).c_str());
|
||||||
std::vector<std::string> hostPartsList;
|
std::vector<std::string> hostPartsList;
|
||||||
Tokenize(host,hostPartsList,":");
|
Tokenize(host,hostPartsList,":");
|
||||||
if(hostPartsList.size() > 1) {
|
if(hostPartsList.size() > 1) {
|
||||||
@@ -252,7 +252,7 @@ void MenuStateJoinGame::reloadUI() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
string port = intToStr(portNumber);
|
string port = intToStr(portNumber);
|
||||||
if(port != intToStr(config.getInt("ServerPort",intToStr(GameConstants::serverPort).c_str()))) {
|
if(port != intToStr(config.getInt("PortServer",intToStr(GameConstants::serverPort).c_str()))) {
|
||||||
port = port + " (" + lang.get("NonStandardPort") + ")";
|
port = port + " (" + lang.get("NonStandardPort") + ")";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -286,7 +286,7 @@ void MenuStateJoinGame::DiscoveredServers(std::vector<string> serverList) {
|
|||||||
if(serverList.empty() == false) {
|
if(serverList.empty() == false) {
|
||||||
Config &config= Config::getInstance();
|
Config &config= Config::getInstance();
|
||||||
string bestIPMatch = "";
|
string bestIPMatch = "";
|
||||||
int serverGamePort = config.getInt("ServerPort",intToStr(GameConstants::serverPort).c_str());
|
int serverGamePort = config.getInt("PortServer",intToStr(GameConstants::serverPort).c_str());
|
||||||
std::vector<std::string> localIPList = Socket::getLocalIPAddressList();
|
std::vector<std::string> localIPList = Socket::getLocalIPAddressList();
|
||||||
|
|
||||||
for(int idx = 0; idx < serverList.size(); idx++) {
|
for(int idx = 0; idx < serverList.size(); idx++) {
|
||||||
@@ -351,7 +351,7 @@ void MenuStateJoinGame::mouseClick(int x, int y, MouseButton mouseButton) {
|
|||||||
|
|
||||||
string host = labelServerIp.getText();
|
string host = labelServerIp.getText();
|
||||||
Config &config= Config::getInstance();
|
Config &config= Config::getInstance();
|
||||||
int portNumber = config.getInt("ServerPort",intToStr(GameConstants::serverPort).c_str());
|
int portNumber = config.getInt("PortServer",intToStr(GameConstants::serverPort).c_str());
|
||||||
std::vector<std::string> hostPartsList;
|
std::vector<std::string> hostPartsList;
|
||||||
Tokenize(host,hostPartsList,":");
|
Tokenize(host,hostPartsList,":");
|
||||||
if(hostPartsList.size() > 1) {
|
if(hostPartsList.size() > 1) {
|
||||||
@@ -362,7 +362,7 @@ void MenuStateJoinGame::mouseClick(int x, int y, MouseButton mouseButton) {
|
|||||||
|
|
||||||
Lang &lang= Lang::getInstance();
|
Lang &lang= Lang::getInstance();
|
||||||
string port = intToStr(portNumber);
|
string port = intToStr(portNumber);
|
||||||
if(port != intToStr(config.getInt("ServerPort",intToStr(GameConstants::serverPort).c_str()))) {
|
if(port != intToStr(config.getInt("PortServer",intToStr(GameConstants::serverPort).c_str()))) {
|
||||||
port = port + " (" + lang.get("NonStandardPort") + ")";
|
port = port + " (" + lang.get("NonStandardPort") + ")";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -738,7 +738,7 @@ void MenuStateJoinGame::connectToServer() {
|
|||||||
|
|
||||||
Config& config= Config::getInstance();
|
Config& config= Config::getInstance();
|
||||||
string host = labelServerIp.getText();
|
string host = labelServerIp.getText();
|
||||||
int port = config.getInt("ServerPort",intToStr(GameConstants::serverPort).c_str());
|
int port = config.getInt("PortServer",intToStr(GameConstants::serverPort).c_str());
|
||||||
std::vector<std::string> hostPartsList;
|
std::vector<std::string> hostPartsList;
|
||||||
Tokenize(host,hostPartsList,":");
|
Tokenize(host,hostPartsList,":");
|
||||||
if(hostPartsList.size() > 1) {
|
if(hostPartsList.size() > 1) {
|
||||||
|
@@ -1048,7 +1048,7 @@ bool MenuStateMasterserver::connectToServer(string ipString, int port) {
|
|||||||
//Config& config= Config::getInstance();
|
//Config& config= Config::getInstance();
|
||||||
Ip serverIp(ipString);
|
Ip serverIp(ipString);
|
||||||
|
|
||||||
//int serverPort = Config::getInstance().getInt("ServerPort",intToStr(GameConstants::serverPort).c_str());
|
//int serverPort = Config::getInstance().getInt("PortServer",intToStr(GameConstants::serverPort).c_str());
|
||||||
int serverPort = port;
|
int serverPort = port;
|
||||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s] try to connect to [%s] serverPort = %d\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,serverIp.getString().c_str(),serverPort);
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s] try to connect to [%s] serverPort = %d\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,serverIp.getString().c_str(),serverPort);
|
||||||
clientInterface->connect(serverIp, serverPort);
|
clientInterface->connect(serverIp, serverPort);
|
||||||
|
@@ -447,7 +447,7 @@ MenuStateOptions::MenuStateOptions(Program *program, MainMenu *mainMenu):
|
|||||||
labelServerPortLabel.init(currentLabelStart,currentLine);
|
labelServerPortLabel.init(currentLabelStart,currentLine);
|
||||||
labelServerPortLabel.setText(lang.get("ServerPort"));
|
labelServerPortLabel.setText(lang.get("ServerPort"));
|
||||||
labelServerPort.init(currentColumnStart,currentLine);
|
labelServerPort.init(currentColumnStart,currentLine);
|
||||||
string port=intToStr(config.getInt("ServerPort"));
|
string port=intToStr(config.getInt("PortServer"));
|
||||||
if(port != intToStr(GameConstants::serverPort)){
|
if(port != intToStr(GameConstants::serverPort)){
|
||||||
port=port +" ("+lang.get("NonStandardPort")+"!!)";
|
port=port +" ("+lang.get("NonStandardPort")+"!!)";
|
||||||
}
|
}
|
||||||
@@ -464,25 +464,25 @@ MenuStateOptions::MenuStateOptions(Program *program, MainMenu *mainMenu):
|
|||||||
labelPublishServerExternalPort.init(currentLabelStart, currentLine, 150);
|
labelPublishServerExternalPort.init(currentLabelStart, currentLine, 150);
|
||||||
labelPublishServerExternalPort.setText(lang.get("PublishServerExternalPort"));
|
labelPublishServerExternalPort.setText(lang.get("PublishServerExternalPort"));
|
||||||
|
|
||||||
listBoxPublishServerExternalPort.registerGraphicComponent(containerName,"listBoxPublishServerExternalPort");
|
listBoxServerPort.registerGraphicComponent(containerName,"listBoxPublishServerExternalPort");
|
||||||
listBoxPublishServerExternalPort.init(currentColumnStart, currentLine, 170);
|
listBoxServerPort.init(currentColumnStart, currentLine, 170);
|
||||||
|
|
||||||
string supportExternalPortList = config.getString("MasterServerExternalPortList",intToStr(GameConstants::serverPort).c_str());
|
string portListString = config.getString("PortList",intToStr(GameConstants::serverPort).c_str());
|
||||||
std::vector<std::string> externalPortList;
|
std::vector<std::string> portList;
|
||||||
Tokenize(supportExternalPortList,externalPortList,",");
|
Tokenize(portListString,portList,",");
|
||||||
|
|
||||||
string currentPort=config.getString("MasterServerExternalPort", intToStr(GameConstants::serverPort).c_str());
|
string currentPort=config.getString("PortExternal", intToStr(GameConstants::serverPort).c_str());
|
||||||
int masterServerExternalPortSelectionIndex=0;
|
int masterServerExternalPortSelectionIndex=0;
|
||||||
for(int idx = 0; idx < externalPortList.size(); idx++) {
|
for(int idx = 0; idx < portList.size(); idx++) {
|
||||||
if(externalPortList[idx] != "" && IsNumeric(externalPortList[idx].c_str(),false)) {
|
if(portList[idx] != "" && IsNumeric(portList[idx].c_str(),false)) {
|
||||||
listBoxPublishServerExternalPort.pushBackItem(externalPortList[idx]);
|
listBoxServerPort.pushBackItem(portList[idx]);
|
||||||
if(currentPort==externalPortList[idx])
|
if(currentPort==portList[idx])
|
||||||
{
|
{
|
||||||
masterServerExternalPortSelectionIndex=idx;
|
masterServerExternalPortSelectionIndex=idx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
listBoxPublishServerExternalPort.setSelectedItemIndex(masterServerExternalPortSelectionIndex);
|
listBoxServerPort.setSelectedItemIndex(masterServerExternalPortSelectionIndex);
|
||||||
|
|
||||||
currentLine-=lineOffset;
|
currentLine-=lineOffset;
|
||||||
// FTP Config - start
|
// FTP Config - start
|
||||||
@@ -686,7 +686,7 @@ void MenuStateOptions::reloadUI() {
|
|||||||
|
|
||||||
labelServerPortLabel.setText(lang.get("ServerPort"));
|
labelServerPortLabel.setText(lang.get("ServerPort"));
|
||||||
Config &config= Config::getInstance();
|
Config &config= Config::getInstance();
|
||||||
string port = intToStr(config.getInt("ServerPort"));
|
string port = intToStr(config.getInt("PortServer"));
|
||||||
if(port != intToStr(GameConstants::serverPort).c_str()) {
|
if(port != intToStr(GameConstants::serverPort).c_str()) {
|
||||||
port = port +" ("+lang.get("NonStandardPort")+"!!)";
|
port = port +" ("+lang.get("NonStandardPort")+"!!)";
|
||||||
}
|
}
|
||||||
@@ -862,8 +862,8 @@ void MenuStateOptions::mouseClick(int x, int y, MouseButton mouseButton){
|
|||||||
listBoxScreenModes.mouseClick(x, y);
|
listBoxScreenModes.mouseClick(x, y);
|
||||||
listFontSizeAdjustment.mouseClick(x, y);
|
listFontSizeAdjustment.mouseClick(x, y);
|
||||||
checkBoxFullscreenWindowed.mouseClick(x, y);
|
checkBoxFullscreenWindowed.mouseClick(x, y);
|
||||||
if(listBoxPublishServerExternalPort.mouseClick(x, y)){
|
if(listBoxServerPort.mouseClick(x, y)){
|
||||||
int selectedPort=strToInt(listBoxPublishServerExternalPort.getSelectedItem());
|
int selectedPort=strToInt(listBoxServerPort.getSelectedItem());
|
||||||
if(selectedPort<10000){
|
if(selectedPort<10000){
|
||||||
selectedPort=GameConstants::serverPort;
|
selectedPort=GameConstants::serverPort;
|
||||||
}
|
}
|
||||||
@@ -922,7 +922,7 @@ void MenuStateOptions::mouseMove(int x, int y, const MouseState *ms){
|
|||||||
listBoxScreenModes.mouseMove(x, y);
|
listBoxScreenModes.mouseMove(x, y);
|
||||||
checkBoxFullscreenWindowed.mouseMove(x, y);
|
checkBoxFullscreenWindowed.mouseMove(x, y);
|
||||||
listFontSizeAdjustment.mouseMove(x, y);
|
listFontSizeAdjustment.mouseMove(x, y);
|
||||||
listBoxPublishServerExternalPort.mouseMove(x, y);
|
listBoxServerPort.mouseMove(x, y);
|
||||||
checkBoxEnableFTP.mouseMove(x, y);
|
checkBoxEnableFTP.mouseMove(x, y);
|
||||||
checkBoxEnableFTPServer.mouseMove(x, y);
|
checkBoxEnableFTPServer.mouseMove(x, y);
|
||||||
checkBoxEnableFTPServerInternetTilesetXfer.mouseMove(x, y);
|
checkBoxEnableFTPServerInternetTilesetXfer.mouseMove(x, y);
|
||||||
@@ -1060,7 +1060,7 @@ void MenuStateOptions::render(){
|
|||||||
renderer.renderLabel(&labelFullscreenWindowed);
|
renderer.renderLabel(&labelFullscreenWindowed);
|
||||||
renderer.renderCheckBox(&checkBoxFullscreenWindowed);
|
renderer.renderCheckBox(&checkBoxFullscreenWindowed);
|
||||||
renderer.renderLabel(&labelPublishServerExternalPort);
|
renderer.renderLabel(&labelPublishServerExternalPort);
|
||||||
renderer.renderListBox(&listBoxPublishServerExternalPort);
|
renderer.renderListBox(&listBoxServerPort);
|
||||||
renderer.renderLabel(&labelNetworkSettings);
|
renderer.renderLabel(&labelNetworkSettings);
|
||||||
|
|
||||||
|
|
||||||
@@ -1150,8 +1150,8 @@ void MenuStateOptions::saveConfig(){
|
|||||||
config.setString("FontSizeAdjustment", listFontSizeAdjustment.getSelectedItem());
|
config.setString("FontSizeAdjustment", listFontSizeAdjustment.getSelectedItem());
|
||||||
CoreData::getInstance().getMenuMusic()->setVolume(strToInt(listBoxVolumeMusic.getSelectedItem())/100.f);
|
CoreData::getInstance().getMenuMusic()->setVolume(strToInt(listBoxVolumeMusic.getSelectedItem())/100.f);
|
||||||
config.setString("SoundVolumeMusic", listBoxVolumeMusic.getSelectedItem());
|
config.setString("SoundVolumeMusic", listBoxVolumeMusic.getSelectedItem());
|
||||||
config.setString("MasterServerExternalPort", listBoxPublishServerExternalPort.getSelectedItem());
|
config.setString("PortExternal", listBoxServerPort.getSelectedItem());
|
||||||
config.setInt("FTPServerPort",config.getInt("MasterServerExternalPort")+1);
|
config.setInt("FTPServerPort",config.getInt("PortExternal")+1);
|
||||||
config.setBool("EnableFTPXfer", checkBoxEnableFTP.getValue());
|
config.setBool("EnableFTPXfer", checkBoxEnableFTP.getValue());
|
||||||
config.setBool("EnableFTPServer", checkBoxEnableFTPServer.getValue());
|
config.setBool("EnableFTPServer", checkBoxEnableFTPServer.getValue());
|
||||||
|
|
||||||
|
@@ -81,7 +81,7 @@ private:
|
|||||||
int mainMessageBoxState;
|
int mainMessageBoxState;
|
||||||
|
|
||||||
GraphicLabel labelPublishServerExternalPort;
|
GraphicLabel labelPublishServerExternalPort;
|
||||||
GraphicListBox listBoxPublishServerExternalPort;
|
GraphicListBox listBoxServerPort;
|
||||||
|
|
||||||
|
|
||||||
GraphicLabel labelEnableFTP;
|
GraphicLabel labelEnableFTP;
|
||||||
|
@@ -1056,7 +1056,7 @@ void ConnectionSlot::update(bool checkForNewClients,int lockedSlotIndex) {
|
|||||||
FileTransferInfo fileInfo;
|
FileTransferInfo fileInfo;
|
||||||
fileInfo.hostType = eServer;
|
fileInfo.hostType = eServer;
|
||||||
//fileInfo.serverIP = this->ip.getString();
|
//fileInfo.serverIP = this->ip.getString();
|
||||||
fileInfo.serverPort = Config::getInstance().getInt("ServerPort",intToStr(GameConstants::serverPort).c_str());
|
fileInfo.serverPort = Config::getInstance().getInt("PortServer",intToStr(GameConstants::serverPort).c_str());
|
||||||
fileInfo.fileName = networkMessageSynchNetworkGameDataFileGet.getFileName();
|
fileInfo.fileName = networkMessageSynchNetworkGameDataFileGet.getFileName();
|
||||||
|
|
||||||
FileTransferSocketThread *fileXferThread = new FileTransferSocketThread(fileInfo);
|
FileTransferSocketThread *fileXferThread = new FileTransferSocketThread(fileInfo);
|
||||||
|
@@ -99,7 +99,7 @@ ServerInterface::ServerInterface(bool publishEnabled) :GameNetworkInterface() {
|
|||||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||||
serverSocket.setBlock(false);
|
serverSocket.setBlock(false);
|
||||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||||
serverSocket.setBindPort(Config::getInstance().getInt("ServerPort", intToStr(GameConstants::serverPort).c_str()));
|
serverSocket.setBindPort(Config::getInstance().getInt("PortServer", intToStr(GameConstants::serverPort).c_str()));
|
||||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -2424,7 +2424,7 @@ std::map<string,string> ServerInterface::publishToMasterserver() {
|
|||||||
publishToServerInfo["activeSlots"] = intToStr(slotCountUsed);
|
publishToServerInfo["activeSlots"] = intToStr(slotCountUsed);
|
||||||
publishToServerInfo["networkSlots"] = intToStr(slotCountHumans);
|
publishToServerInfo["networkSlots"] = intToStr(slotCountHumans);
|
||||||
publishToServerInfo["connectedClients"] = intToStr(slotCountConnectedPlayers);
|
publishToServerInfo["connectedClients"] = intToStr(slotCountConnectedPlayers);
|
||||||
string externalport = config.getString("MasterServerExternalPort", intToStr(GameConstants::serverPort).c_str());
|
string externalport = config.getString("PortExternal", intToStr(GameConstants::serverPort).c_str());
|
||||||
publishToServerInfo["externalconnectport"] = externalport;
|
publishToServerInfo["externalconnectport"] = externalport;
|
||||||
publishToServerInfo["privacyPlease"] = intToStr(config.getBool("PrivacyPlease","false"));
|
publishToServerInfo["privacyPlease"] = intToStr(config.getBool("PrivacyPlease","false"));
|
||||||
publishToServerInfo["gameStatus"] = intToStr(game_status_in_progress);
|
publishToServerInfo["gameStatus"] = intToStr(game_status_in_progress);
|
||||||
|
Reference in New Issue
Block a user