Date: Tuesday July 11, 2000 @ 8:49
Author: karthik
Update of /home/netrek/cvsroot/Vanilla/ntserv
In directory swashbuckler.fortress.real-time.com:/var/tmp/cvs-serv14527
Modified Files:
queue.c solicit.c
Log Message:
Fixing newbie server queue changes (would cause a normal pickup server to
incorrectly report queues if NEWBIESERVER was defined). Checks GU_NEWBIE
instead of #ifdef NEWBIESERVER now.
****************************************
Index: Vanilla/ntserv/queue.c
diff -u Vanilla/ntserv/queue.c:1.6 Vanilla/ntserv/queue.c:1.7
--- Vanilla/ntserv/queue.c:1.6 Thu Jul 6 09:50:55 2000
+++ Vanilla/ntserv/queue.c Tue Jul 11 08:49:12 2000
@@ -142,7 +142,7 @@
queues[QU_NEWBIE_PLR].tournmask = ALLTEAM;
queues[QU_NEWBIE_PLR].low_slot = 0;
queues[QU_NEWBIE_PLR].high_slot = (MAXPLAYER - TESTERS) / 2;
- queues[QU_NEWBIE_PLR].q_flags = QU_OPEN|QU_RESTRICT|QU_REPORT;
+ queues[QU_NEWBIE_PLR].q_flags = QU_OPEN|QU_RESTRICT;
queue_setname(QU_NEWBIE_PLR, "newbie player");
queues[QU_NEWBIE_BOT].free_slots = MAXPLAYER - TESTERS;
@@ -158,7 +158,7 @@
queues[QU_NEWBIE_OBS].tournmask = ALLTEAM;
queues[QU_NEWBIE_OBS].low_slot = MAXPLAYER - (TESTERS / 2);
queues[QU_NEWBIE_OBS].high_slot = MAXPLAYER - 1;
- queues[QU_NEWBIE_OBS].q_flags = QU_OPEN|QU_RESTRICT|QU_OBSERVER|QU_REPORT;
+ queues[QU_NEWBIE_OBS].q_flags = QU_OPEN|QU_RESTRICT|QU_OBSERVER;
queue_setname(QU_NEWBIE_OBS, "newbie observer");
queues[QU_NEWBIE_DMN].free_slots = 1;
Index: Vanilla/ntserv/solicit.c
diff -u Vanilla/ntserv/solicit.c:1.17 Vanilla/ntserv/solicit.c:1.18
--- Vanilla/ntserv/solicit.c:1.17 Thu Jul 6 09:50:55 2000
+++ Vanilla/ntserv/solicit.c Tue Jul 11 08:49:12 2000
@@ -216,29 +216,31 @@
/* don't remake the packet unless necessary */
if ( here == packet ) {
+ if (status->gameup & GU_NEWBIE)
+ for (j = 0; j < queues[QU_NEWBIE_PLR].high_slot; j++)
+ {
+ if (players[j].p_status == PFREE)
+ nfree++;
+ else
+ nplayers++;
+ }
+ else
+ for (j = 0; j < queues[QU_PICKUP].high_slot; j++)
+ {
+ if (players[j].p_status == PFREE)
+ nfree++;
+ else
+ nplayers++;
+ }
- /* count up the number of free slots and players for pickup games */
- /* don't want to go all the way to MAX_PLAYERS. Queue starts at */
- /* queues[QU_PICKUP].high_slot players. */
-#ifdef NEWBIESERVER
- for (j=0; j<queues[QU_NEWBIE_PLR].high_slot; j++)
-#else
- for (j=0; j<queues[QU_PICKUP].high_slot; j++)
-#endif
- if (players[j].p_status == PFREE)
- nfree++;
- else
- nplayers++;
-
/* if the free slots are zero, translate it to a queue length */
/* and report that the game is full */
if (nfree == 0)
{
-#ifdef NEWBIESERVER
- nfree = -queues[QU_NEWBIE_PLR].count;
-#else
- nfree = -queues[QU_PICKUP].count;
-#endif
+ if (status->gameup & GU_NEWBIE)
+ nfree = -queues[QU_NEWBIE_PLR].count;
+ else
+ nfree = -queues[QU_PICKUP].count;
gamefull++;
}