Add command line option for server to allow client version checking to

be disabled.

Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 1086
This commit is contained in:
Simon Howard 2008-02-17 03:12:25 +00:00
parent 72bdda2c48
commit 2b978dbdad
2 changed files with 21 additions and 2 deletions

View file

@ -22,6 +22,11 @@ who is designated the controlling player.
.br
.SH OPTIONS
.TP
\fB-ignoreversion\fR
Ignore version mismatches between the server and the client. Using this
option may cause game desyncs to occur, or differences in protocol may
mean the netgame will simply not function at all.
.TP
\fB-port <n>\fR
Use the specified UDP port for communications, instead of the default (2342).
.SH AUTHOR

View file

@ -478,8 +478,22 @@ static void NET_SV_ParseSYN(net_packet_t *packet,
if (strcmp(client_version, PACKAGE_STRING) != 0)
{
NET_SV_SendReject(addr, "Different versions cannot play a network game!");
return;
//!
// @category net
//
// When running a netgame server, ignore version mismatches between
// the server and the client. Using this option may cause game
// desyncs to occur, or differences in protocol may mean the netgame
// will simply not function at all.
//
if (M_CheckParm("-ignoreversion") == 0)
{
NET_SV_SendReject(addr,
"Version mismatch: server version is: "
PACKAGE_STRING);
return;
}
}
// read the game mode and mission