Vanilla Development Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
CVS update: Vanilla/ntserv
Date: Wednesday December 29, 1999 @ 18:14
Author: unbelver
Update of /home/netrek/cvsroot/Vanilla/ntserv
In directory swashbuckler.fortress.real-time.com:/var/tmp/cvs-serv7073/ntserv
Modified Files:
daemonII.c getentry.c
Log Message:
* ntserv/daemonII.c (udsurrend): Bump non-T race observers to the
team selection window.
* ntserv/getentry.c (tournamentMask): Force observers to choose a
T-mode race, if any.
--Carlos V.
****************************************
Index: Vanilla/ntserv/daemonII.c
diff -u Vanilla/ntserv/daemonII.c:1.27 Vanilla/ntserv/daemonII.c:1.28
--- Vanilla/ntserv/daemonII.c:1.27 Mon Nov 1 04:24:04 1999
+++ Vanilla/ntserv/daemonII.c Wed Dec 29 18:14:48 1999
@@ -2315,6 +2315,23 @@
rescue(TERMINATOR, j->p_no);
}
+
+#ifdef OBSERVERS
+ /*
+ * Bump observers of non-Tmode races to selection screen to choose
+ * T mode teams
+ */
+ for (i = 0, j = &players[0]; i < MAXPLAYER; i++, j++) {
+ if( j->p_status == POBSERV ) {
+ j->p_status = PEXPLODE;
+ j->p_whydead = KPROVIDENCE;
+ j->p_flags &= ~(PFPLOCK | PFPLLOCK);
+ j->p_x = -100000; /* place me off the tactical */
+ j->p_y = -100000;
+ }
+ }
+#endif /* OBSERVERS */
+
for (t = 0; t <= MAXTEAM; t++) { /* maint: was "<" 6/22/92 TC */
/* "suspend" countdown if less than Tmode players */
if ((teams[t].s_surrender == 0) || (realNumShips(t) < tournplayers))
Index: Vanilla/ntserv/getentry.c
diff -u Vanilla/ntserv/getentry.c:1.5 Vanilla/ntserv/getentry.c:1.6
--- Vanilla/ntserv/getentry.c:1.5 Fri May 28 03:40:42 1999
+++ Vanilla/ntserv/getentry.c Wed Dec 29 18:14:48 1999
@@ -287,11 +287,7 @@
* Observers can watch any team in their queue, but may not
* change teams once they have made their selection
*/
- if (queues[w_queue].q_flags&QU_OBSERVER){
- if (team==ALLTEAM) return (allteams);
- else return (team);
- }
-
+
for (i = 0; i < NUMTEAM; i++) {
if ((np[i] = realNumShips(1 << i)) > largest) {
nextlargest = largest;
@@ -318,6 +314,21 @@
* We think we are in t-mode and go for re-entry.
* We know the t-mode teams, we think.
*/
+
+ /*
+ * First, make sure observers pick a t-mode team
+ */
+ if (queues[w_queue].q_flags&QU_OBSERVER){
+ if (team == ALLTEAM || ((team & (il | inl)) == 0)) /* initial entry case */
+ return (il | inl);
+ else if (deadTeam(team)) /* must have been on one of those two? */
+ return (allteams & ~il & ~inl); /* switch, but not to one of those two? */
+ }
+
+ /*
+ * Next, make sure players pick a t-mode team that needs players
+ */
+
tinydiff = (largest - nextlargest) < 2;
if (team == ALLTEAM || ((team & (il | inl)) == 0)) /* initial entry case */
return (tinydiff ? allteams & (il | inl) : (inl & allteams ? inl : allteams & ~il));