Replaces Masterserver setter/getter with the ones from lobbyclient.
parent
8375e2281a
commit
273d6381d3
|
@ -2258,40 +2258,6 @@ bool NETjoinGame(const char* host, uint32_t port, const char* playername)
|
|||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
* Set the masterserver name
|
||||
* \param hostname The hostname of the masterserver to connect to
|
||||
*/
|
||||
void NETsetMasterserverName(const char* hostname)
|
||||
{
|
||||
lobbyclient.setHost(hostname);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The hostname of the masterserver we will connect to.
|
||||
*/
|
||||
const char* NETgetMasterserverName()
|
||||
{
|
||||
return lobbyclient.getHost().c_str();
|
||||
}
|
||||
|
||||
/*!
|
||||
* Set the masterserver port
|
||||
* \param port The port of the masterserver to connect to
|
||||
*/
|
||||
void NETsetMasterserverPort(unsigned int port)
|
||||
{
|
||||
lobbyclient.setPort(port);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The port of the masterserver we will connect to.
|
||||
*/
|
||||
unsigned int NETgetMasterserverPort()
|
||||
{
|
||||
return lobbyclient.getPort();
|
||||
}
|
||||
|
||||
/*!
|
||||
* Set the port we shall host games on
|
||||
* \param port The port to listen to
|
||||
|
|
|
@ -291,10 +291,6 @@ void NETfixDuplicatePlayerNames(void); // Change a player's name aut
|
|||
|
||||
#include "netlog.h"
|
||||
|
||||
extern void NETsetMasterserverName(const char* hostname);
|
||||
extern const char* NETgetMasterserverName(void);
|
||||
extern void NETsetMasterserverPort(unsigned int port);
|
||||
extern unsigned int NETgetMasterserverPort(void);
|
||||
extern void NETsetGameserverPort(unsigned int port);
|
||||
extern unsigned int NETgetGameserverPort(void);
|
||||
|
||||
|
|
|
@ -77,11 +77,11 @@ bool loadConfig()
|
|||
setMiddleClickRotate(ini.value("MiddleClickRotate", false).toBool());
|
||||
rotateRadar = ini.value("rotateRadar", true).toBool();
|
||||
war_SetPauseOnFocusLoss(ini.value("PauseOnFocusLoss", false).toBool());
|
||||
NETsetMasterserverName(ini.value("masterserver_name", "lobby.wz2100.net").toString().toUtf8().constData());
|
||||
lobbyclient.setHost(ini.value("masterserver_name", "lobby.wz2100.net").toString().toUtf8().constData());
|
||||
lobbyclient.setPort(ini.value("masterserver_port", MASTERSERVERPORT).toInt());
|
||||
iV_font(ini.value("fontname", "DejaVu Sans").toString().toUtf8().constData(),
|
||||
ini.value("fontface", "Book").toString().toUtf8().constData(),
|
||||
ini.value("fontfacebold", "Bold").toString().toUtf8().constData());
|
||||
NETsetMasterserverPort(ini.value("masterserver_port", MASTERSERVERPORT).toInt());
|
||||
NETsetGameserverPort(ini.value("gameserver_port", GAMESERVERPORT).toInt());
|
||||
war_SetFMVmode((FMV_MODE)ini.value("FMVmode", FMV_FULLSCREEN).toInt());
|
||||
seq_SetSubtitles(ini.value("subtitles", true).toBool());
|
||||
|
@ -186,8 +186,8 @@ bool saveConfig()
|
|||
ini.setValue("UPnP", (SDWORD)NetPlay.isUPNP);
|
||||
ini.setValue("rotateRadar", rotateRadar);
|
||||
ini.setValue("PauseOnFocusLoss", war_GetPauseOnFocusLoss());
|
||||
ini.setValue("masterserver_name", NETgetMasterserverName());
|
||||
ini.setValue("masterserver_port", NETgetMasterserverPort());
|
||||
ini.setValue("masterserver_name", lobbyclient.getHost().c_str());
|
||||
ini.setValue("masterserver_port", lobbyclient.getPort());
|
||||
ini.setValue("gameserver_port", NETgetGameserverPort());
|
||||
if (!bMultiPlayer)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue