Vanilla Development Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CVS update: Vanilla/robots



Date:	Thursday July 8, 1999 @ 14:40
Author:	unbelver

Update of /home/netrek/cvsroot/Vanilla/robots
In directory cvs.castle.real-time.com:/var/tmp/cvs-serv10709

Modified Files:
	inl.c 
Log Message:

Moving the obliterate before the stats processing and adding a delay
before stats processing.  Hopefully last ship stats will be
accumulated for the endgame.  I need to verify with Ahn.

--Carlos V.




****************************************

Index: Vanilla/robots/inl.c
diff -u Vanilla/robots/inl.c:1.21 Vanilla/robots/inl.c:1.22
--- Vanilla/robots/inl.c:1.21	Wed Jul  7 20:35:08 1999
+++ Vanilla/robots/inl.c	Thu Jul  8 14:40:40 1999
@@ -1,7 +1,7 @@
-/* 	$Id: inl.c,v 1.21 1999/07/08 01:35:08 unbelver Exp $	 */
+/* 	$Id: inl.c,v 1.22 1999/07/08 19:40:40 unbelver Exp $	 */
 
 #ifndef lint
-static char vcid[] = "$Id: inl.c,v 1.21 1999/07/08 01:35:08 unbelver Exp $";
+static char vcid[] = "$Id: inl.c,v 1.22 1999/07/08 19:40:40 unbelver Exp $";
 #endif /* lint */
 
 /*
@@ -667,11 +667,29 @@
     struct timeval tv;
     int c, official = 0;
 
+    /* Set the queues so players go to default side */
+    queues[QU_HOME].tournmask = HOMETEAM;
+    queues[QU_AWAY].tournmask = AWAYTEAM;
+    queues[QU_HOME_OBS].tournmask = HOMETEAM;
+    queues[QU_AWAY_OBS].tournmask = AWAYTEAM;
+
+    /* make every planet visible */
+    for (c = 0; c < MAXPLANETS; c++)
+      {
+        planets[c].pl_info = ALLTEAM;
+      }
+
+    /* and make everybody re-join */
+    obliterate(1, TOURNEND);
+    
     status->tourn = 0;
 
     gettimeofday(&tv, (struct timezone *) 0);
     fprintf(inl_log, "TIME: Game ending at %d seconds\n", tv.tv_sec);
     fclose(inl_log);
+
+    sleep(2); /* a kluge to allow time for all the ntservs to run */
+              /* savestats() before stats-post processing I hope  */
     
     sprintf(name, "%s.%d", N_INLLOG, tv.tv_sec);
     rename(N_INLLOG, name);
@@ -738,20 +756,6 @@
     }
 
     reset_inl(1);
-    /* Set the queues so players go to default side */
-    queues[QU_HOME].tournmask = inl_teams[HOME].side;
-    queues[QU_AWAY].tournmask = inl_teams[AWAY].side;
-    queues[QU_HOME_OBS].tournmask = inl_teams[HOME].side;
-    queues[QU_AWAY_OBS].tournmask = inl_teams[AWAY].side;
-
-    /* make every planet visible */
-    for (c = 0; c < MAXPLANETS; c++)
-      {
-	planets[c].pl_info = ALLTEAM;
-      }
-    
-    /* and make everybody re-join */
-    obliterate(1, TOURNEND);
 
   } /* if (game_over) */