summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Howard2008-02-17 03:12:25 +0000
committerSimon Howard2008-02-17 03:12:25 +0000
commit2b978dbdade40124667ff139140abb5006f0ad1a (patch)
treedb6774464b83b3fb99b3530e5c2e098a33f3e86e
parent72bdda2c48147f37c7f3630f0b5353ef319b6a85 (diff)
downloadchocolate-doom-2b978dbdade40124667ff139140abb5006f0ad1a.tar.gz
chocolate-doom-2b978dbdade40124667ff139140abb5006f0ad1a.tar.bz2
chocolate-doom-2b978dbdade40124667ff139140abb5006f0ad1a.zip
Add command line option for server to allow client version checking to
be disabled. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 1086
-rw-r--r--man/chocolate-server.65
-rw-r--r--src/net_server.c18
2 files changed, 21 insertions, 2 deletions
diff --git a/man/chocolate-server.6 b/man/chocolate-server.6
index e341fc25..1522c7c8 100644
--- a/man/chocolate-server.6
+++ b/man/chocolate-server.6
@@ -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
diff --git a/src/net_server.c b/src/net_server.c
index 287bf113..23612980 100644
--- a/src/net_server.c
+++ b/src/net_server.c
@@ -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