[chocolate-doom] 57/79: Only start new games when in the waiting-for-start state.

Jonathan Dowland jmtd at moszumanska.debian.org
Mon Jan 30 15:07:25 UTC 2017


This is an automated email from the git hooks/post-receive script.

jmtd pushed a commit to annotated tag chocolate-doom-0.1.3
in repository chocolate-doom.

commit 01e9eff0e42b4255fd230fe1f9e5de9c9ed16e8f
Author: Simon Howard <fraggle at gmail.com>
Date:   Thu Jan 12 02:18:59 2006 +0000

    Only start new games when in the waiting-for-start state.
    
    Subversion-branch: /trunk/chocolate-doom
    Subversion-revision: 285
---
 src/net_client.c | 12 +++++++++++-
 src/net_server.c | 12 +++++++++++-
 2 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/src/net_client.c b/src/net_client.c
index f70a7c0..c071d37 100644
--- a/src/net_client.c
+++ b/src/net_client.c
@@ -1,7 +1,7 @@
 // Emacs style mode select   -*- C++ -*- 
 //-----------------------------------------------------------------------------
 //
-// $Id: net_client.c 284 2006-01-12 02:11:52Z fraggle $
+// $Id: net_client.c 285 2006-01-12 02:18:59Z fraggle $
 //
 // Copyright(C) 2005 Simon Howard
 //
@@ -21,6 +21,9 @@
 // 02111-1307, USA.
 //
 // $Log$
+// Revision 1.18  2006/01/12 02:18:59  fraggle
+// Only start new games when in the waiting-for-start state.
+//
 // Revision 1.17  2006/01/12 02:11:52  fraggle
 // Game start packets
 //
@@ -251,6 +254,13 @@ static void NET_CL_ParseGameStart(net_packet_t *packet)
         return;
     }
 
+    if (client_state != CLIENT_STATE_WAITING_START)
+    {
+        return;
+    }
+
+    // Start the game
+
     consoleplayer = player_number;
     
     for (i=0; i<MAXPLAYERS; ++i) 
diff --git a/src/net_server.c b/src/net_server.c
index 8991202..31ea03e 100644
--- a/src/net_server.c
+++ b/src/net_server.c
@@ -1,7 +1,7 @@
 // Emacs style mode select   -*- C++ -*- 
 //-----------------------------------------------------------------------------
 //
-// $Id: net_server.c 284 2006-01-12 02:11:52Z fraggle $
+// $Id: net_server.c 285 2006-01-12 02:18:59Z fraggle $
 //
 // Copyright(C) 2005 Simon Howard
 //
@@ -21,6 +21,9 @@
 // 02111-1307, USA.
 //
 // $Log$
+// Revision 1.21  2006/01/12 02:18:59  fraggle
+// Only start new games when in the waiting-for-start state.
+//
 // Revision 1.20  2006/01/12 02:11:52  fraggle
 // Game start packets
 //
@@ -410,6 +413,13 @@ static void NET_SV_ParseGameStart(net_packet_t *packet, net_client_t *client)
         return;
     }
 
+    if (server_state != SERVER_WAITING_START)
+    {
+        // Can only start a game if we are in the waiting start state.
+
+        return;
+    }
+
     // Change server state
 
     server_state = SERVER_IN_GAME;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/chocolate-doom.git



More information about the Pkg-games-commits mailing list