# HG changeset patch
# User gongo
# Date 1162968377 0
# Node ID a333d360ea6fd51db185a0831515b6dee374f21f
# Parent  30fe49501a997fcffe0a8e5c600ac441140a1459
*** empty log message ***

diff -r 30fe49501a99 -r a333d360ea6f linda.c
--- a/linda.c	Wed Nov 08 06:32:30 2006 +0000
+++ b/linda.c	Wed Nov 08 06:46:17 2006 +0000
@@ -116,10 +116,8 @@
     int connect = 1; // ��³�Ѥߥ桼����
 
     for (i=1; i<=CLIENT_MAX; i++) {
+	get_packet(i, &flg, NULL, NULL, NULL, NULL);
 	if (i == id) continue;
-
-	get_packet(i, &flg, NULL, NULL, NULL, NULL);
-
 	if (flg == 1) connect++;
     }
 
@@ -155,9 +153,8 @@
     int connect = 1;
 
     for (i=1; i<=CLIENT_MAX; i++) {
+	get_packet(i, &flg, &mode, NULL, NULL, NULL);
 	if (i == id) continue;
-
-	get_packet(i, &flg, &mode, NULL, NULL, NULL);
 	if (flg == 1 && mode == MODE_WAIT_READY)
 	    connect++;
     }
@@ -194,9 +191,8 @@
     int connect = 1;
 
     for (i=1; i<=CLIENT_MAX; i++) {
+	get_packet(i, &flg, &mode, NULL, NULL, NULL);
 	if (i == id) continue;
-
-	get_packet(i, &flg, &mode, NULL, NULL, NULL);
 	if (flg == 1 && mode == MODE_OPENING)
 	    connect++;
     }
@@ -232,9 +228,8 @@
     int connect = 1;
 
     for (i=1; i<=CLIENT_MAX; i++) {
+	get_packet(i, &flg, &mode, NULL, NULL, NULL);
 	if (i == id) continue;
-
-	get_packet(i, &flg, &mode, NULL, NULL, NULL);
 	if (flg == 1 && mode == MODE_SELECT_CAR)
 	    connect++;
     }
@@ -267,20 +262,20 @@
 {
     int i;
     int flg, mode;
-    int connect;
+    int connect = 1;
     int id = game.play_id;
     static int course_id = 1;
 
     if (course_id != game.course_id) {
 	course_id = game.course_id;
+	linda_seq[game.play_id] = psx_in(game.play_id);
 	send_packet(game.play_id, MODE_SELECT_COURSE, 0, course_id, NULL);
-	return TRUE;
+	return FALSE;
     }
 
     for (i=1; i<=CLIENT_MAX; i++) {
+	get_packet(i, &flg, &mode, NULL, NULL, NULL);
 	if (i == id) continue;
-
-	get_packet(i, &flg, &mode, NULL, NULL, NULL);
 	if (flg == 1 && mode == MODE_SELECT_COURSE)
 	    connect++;
     }