Use arg_port_number for -udp_hostport
This commit is contained in:
parent
9597147283
commit
3ca442cb33
|
@ -23,9 +23,7 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
#ifndef _ARGS_H
|
|
||||||
#define _ARGS_H
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
@ -84,7 +82,7 @@ struct Arg
|
||||||
int OglFixedFont;
|
int OglFixedFont;
|
||||||
#endif
|
#endif
|
||||||
const char *MplUdpHostAddr;
|
const char *MplUdpHostAddr;
|
||||||
int MplUdpHostPort;
|
uint16_t MplUdpHostPort;
|
||||||
uint16_t MplUdpMyPort;
|
uint16_t MplUdpMyPort;
|
||||||
#ifdef USE_TRACKER
|
#ifdef USE_TRACKER
|
||||||
uint16_t MplTrackerPort;
|
uint16_t MplTrackerPort;
|
||||||
|
@ -133,5 +131,3 @@ static inline const char *PLAYER_DIRECTORY_STRING(const char *s, const char *)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -216,7 +216,10 @@ static void ReadCmdArgs(void)
|
||||||
else if (!d_stricmp(p, "-udp_hostaddr"))
|
else if (!d_stricmp(p, "-udp_hostaddr"))
|
||||||
GameArg.MplUdpHostAddr = arg_string(pp, end);
|
GameArg.MplUdpHostAddr = arg_string(pp, end);
|
||||||
else if (!d_stricmp(p, "-udp_hostport"))
|
else if (!d_stricmp(p, "-udp_hostport"))
|
||||||
GameArg.MplUdpHostPort = arg_integer(pp, end);
|
/* Peers use -udp_myport to change, so peer cannot set a
|
||||||
|
* privileged port.
|
||||||
|
*/
|
||||||
|
arg_port_number(pp, end, GameArg.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);
|
||||||
|
|
Loading…
Reference in a new issue