Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
SRB2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jaden
SRB2
Commits
843d9b9f
Commit
843d9b9f
authored
5 years ago
by
James R.
Browse files
Options
Downloads
Patches
Plain Diff
-clientport (it's back!) and -serverport, which is an alias to -port
If you ever need to, you can change the client port number.
parent
4e321012
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/i_tcp.c
+11
-7
11 additions, 7 deletions
src/i_tcp.c
with
11 additions
and
7 deletions
src/i_tcp.c
+
11
−
7
View file @
843d9b9f
...
@@ -209,7 +209,8 @@ static size_t numbans = 0;
...
@@ -209,7 +209,8 @@ static size_t numbans = 0;
static
boolean
SOCK_bannednode
[
MAXNETNODES
+
1
];
/// \note do we really need the +1?
static
boolean
SOCK_bannednode
[
MAXNETNODES
+
1
];
/// \note do we really need the +1?
static
boolean
init_tcp_driver
=
false
;
static
boolean
init_tcp_driver
=
false
;
static
const
char
*
port_name
=
DEFAULTPORT
;
static
const
char
*
serverport_name
=
DEFAULTPORT
;
static
const
char
*
clientport_name
;
/* any port */
#ifndef NONET
#ifndef NONET
...
@@ -904,9 +905,9 @@ static boolean UDP_Socket(void)
...
@@ -904,9 +905,9 @@ static boolean UDP_Socket(void)
hints
.
ai_protocol
=
IPPROTO_UDP
;
hints
.
ai_protocol
=
IPPROTO_UDP
;
if
(
serverrunning
)
if
(
serverrunning
)
serv
=
port_name
;
serv
=
server
port_name
;
else
else
serv
=
NULL
;
/* any port */
serv
=
clientport_name
;
if
(
M_CheckParm
(
"-bindaddr"
))
if
(
M_CheckParm
(
"-bindaddr"
))
{
{
...
@@ -948,8 +949,8 @@ static boolean UDP_Socket(void)
...
@@ -948,8 +949,8 @@ static boolean UDP_Socket(void)
#ifdef HAVE_MINIUPNPC
#ifdef HAVE_MINIUPNPC
if
(
UPNP_support
)
if
(
UPNP_support
)
{
{
I_UPnP_rem
(
port_name
,
"UDP"
);
I_UPnP_rem
(
server
port_name
,
"UDP"
);
I_UPnP_add
(
NULL
,
port_name
,
"UDP"
);
I_UPnP_add
(
NULL
,
server
port_name
,
"UDP"
);
}
}
#endif
#endif
}
}
...
@@ -1427,16 +1428,19 @@ boolean I_InitTcpNetwork(void)
...
@@ -1427,16 +1428,19 @@ boolean I_InitTcpNetwork(void)
if
(
!
I_InitTcpDriver
())
if
(
!
I_InitTcpDriver
())
return
false
;
return
false
;
if
(
M_CheckParm
(
"-port"
))
if
(
M_CheckParm
(
"-port"
)
||
M_CheckParm
(
"-serverport"
)
)
// Combined -udpport and -clientport into -port
// Combined -udpport and -clientport into -port
// As it was really redundant having two seperate parms that does the same thing
// As it was really redundant having two seperate parms that does the same thing
/* Sorry Steel, I'm adding these back. But -udpport is a stupid name. */
{
{
/*
/*
If it's NULL, that's okay! Because then
If it's NULL, that's okay! Because then
we'll get a random port from getaddrinfo.
we'll get a random port from getaddrinfo.
*/
*/
port_name
=
M_GetNextParm
();
server
port_name
=
M_GetNextParm
();
}
}
if
(
M_CheckParm
(
"-clientport"
))
clientport_name
=
M_GetNextParm
();
// parse network game options,
// parse network game options,
if
(
M_CheckParm
(
"-server"
)
||
dedicated
)
if
(
M_CheckParm
(
"-server"
)
||
dedicated
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment