Move MplUdpHostPort to CArg
This commit is contained in:
parent
0fb84b883f
commit
56e77d4fec
|
@ -114,6 +114,7 @@ struct CArg : prohibit_void_ptr<CArg>
|
|||
int8_t DbgVerbose;
|
||||
bool SysNoNiceFPS;
|
||||
int SysMaxFPS;
|
||||
uint16_t MplUdpHostPort;
|
||||
std::string SysMissionDir;
|
||||
std::string SysHogDir;
|
||||
std::string SysPilot;
|
||||
|
@ -138,7 +139,6 @@ struct Arg : prohibit_void_ptr<Arg>
|
|||
bool GfxSkipHiresGFX;
|
||||
int SndDigiSampleRate;
|
||||
#endif
|
||||
uint16_t MplUdpHostPort;
|
||||
uint16_t MplUdpMyPort;
|
||||
#ifdef USE_TRACKER
|
||||
uint16_t MplTrackerPort;
|
||||
|
|
|
@ -988,7 +988,7 @@ void net_udp_manual_join_game()
|
|||
net_udp_init();
|
||||
|
||||
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();
|
||||
|
||||
|
|
|
@ -301,7 +301,7 @@ static void ReadCmdArgs(Inilist &ini, Arglist &Args)
|
|||
/* Peers use -udp_myport to change, so peer cannot set a
|
||||
* 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"))
|
||||
{
|
||||
arg_port_number(pp, end, GameArg.MplUdpMyPort, false);
|
||||
|
|
Loading…
Reference in a new issue