summaryrefslogtreecommitdiff
path: root/src/net_client.c
diff options
context:
space:
mode:
authorSimon Howard2006-01-13 23:52:12 +0000
committerSimon Howard2006-01-13 23:52:12 +0000
commit8a6bdf645f50726000d2491cb52d41b69acd87a4 (patch)
treeec4a2c6a6cd60952b6ec6e56ba2db308d9a94ace /src/net_client.c
parent01a403802ecc6465a0dec05b52b3d179732bb7c7 (diff)
downloadchocolate-doom-8a6bdf645f50726000d2491cb52d41b69acd87a4.tar.gz
chocolate-doom-8a6bdf645f50726000d2491cb52d41b69acd87a4.tar.bz2
chocolate-doom-8a6bdf645f50726000d2491cb52d41b69acd87a4.zip
Fix game start packet parsing logic.
Subversion-branch: /trunk/chocolate-doom Subversion-revision: 290
Diffstat (limited to 'src/net_client.c')
-rw-r--r--src/net_client.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/net_client.c b/src/net_client.c
index e08a9f9f..1dcdf0a8 100644
--- a/src/net_client.c
+++ b/src/net_client.c
@@ -1,7 +1,7 @@
// Emacs style mode select -*- C++ -*-
//-----------------------------------------------------------------------------
//
-// $Id: net_client.c 286 2006-01-13 02:19:18Z fraggle $
+// $Id: net_client.c 290 2006-01-13 23:52:12Z fraggle $
//
// Copyright(C) 2005 Simon Howard
//
@@ -21,6 +21,9 @@
// 02111-1307, USA.
//
// $Log$
+// Revision 1.20 2006/01/13 23:52:12 fraggle
+// Fix game start packet parsing logic.
+//
// Revision 1.19 2006/01/13 02:19:18 fraggle
// Only accept sane player values when starting a new game.
//
@@ -250,8 +253,8 @@ static void NET_CL_ParseGameStart(net_packet_t *packet)
unsigned int player_number, num_players;
int i;
- if (!NET_ReadInt8(packet, &player_number)
- || !NET_ReadInt8(packet, &num_players)
+ if (!NET_ReadInt8(packet, &num_players)
+ || !NET_ReadInt8(packet, &player_number)
|| !NET_ReadSettings(packet, &settings))
{
return;
@@ -285,6 +288,9 @@ static void NET_CL_ParseGameStart(net_packet_t *packet)
startepisode = settings.episode;
startmap = settings.map;
startskill = settings.skill;
+
+ netgame = true;
+ autostart = true;
}
// parse a received packet