summaryrefslogtreecommitdiff
path: root/src/net_client.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/net_client.c')
-rw-r--r--src/net_client.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/net_client.c b/src/net_client.c
index bc31740d..39272dd0 100644
--- a/src/net_client.c
+++ b/src/net_client.c
@@ -1,7 +1,7 @@
// Emacs style mode select -*- C++ -*-
//-----------------------------------------------------------------------------
//
-// $Id: net_client.c 694 2006-10-11 22:55:06Z fraggle $
+// $Id: net_client.c 698 2006-10-14 12:55:02Z fraggle $
//
// Copyright(C) 2005 Simon Howard
//
@@ -250,6 +250,10 @@ char net_player_names[MAXPLAYERS][MAXPLAYERNAME];
md5_digest_t net_server_wad_md5sum;
md5_digest_t net_server_deh_md5sum;
+// Is the server a freedoom game?
+
+unsigned int net_server_is_freedoom;
+
// Player number
int net_player_number;
@@ -287,6 +291,10 @@ static unsigned int gamedata_recv_time;
md5_digest_t net_local_wad_md5sum;
md5_digest_t net_local_deh_md5sum;
+// Are we playing with the freedoom IWAD?
+
+unsigned int net_local_is_freedoom;
+
// Average time between sending our ticcmd and receiving from the server
static fixed_t average_latency;
@@ -642,6 +650,7 @@ static void NET_CL_ParseWaitingData(net_packet_t *packet)
char *player_names[MAXPLAYERS];
char *player_addr[MAXPLAYERS];
md5_digest_t wad_md5sum, deh_md5sum;
+ unsigned int server_is_freedoom;
size_t i;
if (!NET_ReadInt8(packet, &num_players)
@@ -683,7 +692,8 @@ static void NET_CL_ParseWaitingData(net_packet_t *packet)
}
if (!NET_ReadMD5Sum(packet, wad_md5sum)
- || !NET_ReadMD5Sum(packet, deh_md5sum))
+ || !NET_ReadMD5Sum(packet, deh_md5sum)
+ || !NET_ReadInt8(packet, &server_is_freedoom))
{
return;
}
@@ -702,6 +712,7 @@ static void NET_CL_ParseWaitingData(net_packet_t *packet)
memcpy(net_server_wad_md5sum, wad_md5sum, sizeof(md5_digest_t));
memcpy(net_server_deh_md5sum, deh_md5sum, sizeof(md5_digest_t));
+ net_server_is_freedoom = server_is_freedoom;
net_client_received_wait_data = true;
}
@@ -1188,6 +1199,7 @@ static void NET_CL_SendSYN(void)
NET_WriteInt8(packet, drone);
NET_WriteMD5Sum(packet, net_local_wad_md5sum);
NET_WriteMD5Sum(packet, net_local_deh_md5sum);
+ NET_WriteInt8(packet, net_local_is_freedoom);
NET_WriteString(packet, net_player_name);
NET_Conn_SendPacket(&client_connection, packet);
NET_FreePacket(packet);
@@ -1214,6 +1226,10 @@ boolean NET_CL_Connect(net_addr_t *addr)
W_Checksum(net_local_wad_md5sum);
DEH_Checksum(net_local_deh_md5sum);
+ // Are we playing with the Freedoom IWAD?
+
+ net_local_is_freedoom = W_CheckNumForName("FREEDOOM") >= 0;
+
// create a new network I/O context and add just the
// necessary module