Move MplUdpHostPort to CArg

This commit is contained in:
Kp 2015-12-24 04:01:28 +00:00
parent 0fb84b883f
commit 56e77d4fec
3 changed files with 3 additions and 3 deletions

View file

@ -114,6 +114,7 @@ struct CArg : prohibit_void_ptr<CArg>
int8_t DbgVerbose; int8_t DbgVerbose;
bool SysNoNiceFPS; bool SysNoNiceFPS;
int SysMaxFPS; int SysMaxFPS;
uint16_t MplUdpHostPort;
std::string SysMissionDir; std::string SysMissionDir;
std::string SysHogDir; std::string SysHogDir;
std::string SysPilot; std::string SysPilot;
@ -138,7 +139,6 @@ struct Arg : prohibit_void_ptr<Arg>
bool GfxSkipHiresGFX; bool GfxSkipHiresGFX;
int SndDigiSampleRate; int SndDigiSampleRate;
#endif #endif
uint16_t MplUdpHostPort;
uint16_t MplUdpMyPort; uint16_t MplUdpMyPort;
#ifdef USE_TRACKER #ifdef USE_TRACKER
uint16_t MplTrackerPort; uint16_t MplTrackerPort;

View file

@ -988,7 +988,7 @@ void net_udp_manual_join_game()
net_udp_init(); net_udp_init();
snprintf(dj->addrbuf, sizeof(dj->addrbuf), "%s", CGameArg.MplUdpHostAddr.c_str()); snprintf(dj->addrbuf, sizeof(dj->addrbuf), "%s", CGameArg.MplUdpHostAddr.c_str());
snprintf(dj->hostportbuf, sizeof(dj->hostportbuf), "%hu", GameArg.MplUdpHostPort ? GameArg.MplUdpHostPort : UDP_PORT_DEFAULT); snprintf(dj->hostportbuf, sizeof(dj->hostportbuf), "%hu", CGameArg.MplUdpHostPort ? CGameArg.MplUdpHostPort : UDP_PORT_DEFAULT);
reset_UDP_MyPort(); reset_UDP_MyPort();

View file

@ -301,7 +301,7 @@ static void ReadCmdArgs(Inilist &ini, Arglist &Args)
/* Peers use -udp_myport to change, so peer cannot set a /* Peers use -udp_myport to change, so peer cannot set a
* privileged port. * privileged port.
*/ */
arg_port_number(pp, end, GameArg.MplUdpHostPort, false); arg_port_number(pp, end, CGameArg.MplUdpHostPort, false);
else if (!d_stricmp(p, "-udp_myport")) else if (!d_stricmp(p, "-udp_myport"))
{ {
arg_port_number(pp, end, GameArg.MplUdpMyPort, false); arg_port_number(pp, end, GameArg.MplUdpMyPort, false);