diff -urN xpilot-4.U.4a3/Local.config xpilot-4.U.4tc99b/Local.config
--- xpilot-4.U.4a3/Local.config	Wed Sep 22 21:37:35 1999
+++ xpilot-4.U.4tc99b/Local.config	Wed Sep 22 20:44:48 1999
@@ -175,8 +175,8 @@
       VERSION_MINOR = U
  VERSION_PATCHLEVEL = 4
     VERSION_WINDOWS = 13
-     VERSION_STATUS = alpha3
-        RELEASEDATE = May 30th, 1999
+     VERSION_STATUS = TC99b
+        RELEASEDATE = Aug 30th, 1999
 
 
 /*
diff -urN xpilot-4.U.4a3/src/common/config.h xpilot-4.U.4tc99b/src/common/config.h
--- xpilot-4.U.4a3/src/common/config.h	Fri Apr 17 13:40:51 1998
+++ xpilot-4.U.4tc99b/src/common/config.h	Mon Aug 30 01:03:12 1999
@@ -36,9 +36,9 @@
 
 #ifndef	DEFAULT_MAP
 #	ifdef	_WINDOWS
-#		define DEFAULT_MAP		"default.xp"
+#		define DEFAULT_MAP		"tc99.xp"
 #	else
-#		define DEFAULT_MAP		"globe.xp"
+#		define DEFAULT_MAP		"tc99.xp"
 #	endif
 #endif
 
diff -urN xpilot-4.U.4a3/src/common/const.h xpilot-4.U.4tc99b/src/common/const.h
--- xpilot-4.U.4a3/src/common/const.h	Wed Sep 22 21:37:37 1999
+++ xpilot-4.U.4tc99b/src/common/const.h	Sat Sep 18 20:31:15 1999
@@ -293,7 +293,7 @@
 
 #define GRAVS_POWER		2.7
 
-#define SHIP_SZ		        14  /* Size (pixels) of radius for legal HIT! */
+#define SHIP_SZ		        16  /* Size (pixels) of radius for legal HIT! */
 #define VISIBILITY_DISTANCE	1000.0
 #define WARNING_DISTANCE	(VISIBILITY_DISTANCE*0.8)
 
diff -urN xpilot-4.U.4a3/src/common/version.h xpilot-4.U.4tc99b/src/common/version.h
--- xpilot-4.U.4a3/src/common/version.h	Wed Sep 22 21:37:37 1999
+++ xpilot-4.U.4tc99b/src/common/version.h	Wed Sep 22 20:44:48 1999
@@ -28,15 +28,15 @@
 #if defined(__hpux)
 #   pragma COPYRIGHT_DATE	"1991-1998"
 #   pragma COPYRIGHT		"Bjørn Stabell, Ken Ronny Schouten, Bert Gijsbers & Dick Balaska"
-#   pragma VERSIONID		"XPilot 4.U.4alpha3"
+#   pragma VERSIONID		"XPilot 4.U.4TC99b"
 #endif
 
-#define VERSION			"4.U.4alpha3"
+#define VERSION			"4.U.4TC99b"
 #ifdef	_WINDOWS
-#define	TITLE			"4.U.4alpha3-NT13"
+#define	TITLE			"4.U.4TC99b-NT13"
 #define	VERSION_WINDOWS	"13"
 #else
-#define TITLE			"XPilot 4.U.4alpha3"
+#define TITLE			"XPilot 4.U.4TC99b"
 #endif
 #define AUTHORS			"Bjørn Stabell, Ken Ronny Schouten, Bert Gijsbers & Dick Balaska"
 #define COPYRIGHT		"Copyright © 1991-1998 by Bjørn Stabell, Ken Ronny Schouten, Bert Gijsbers & Dick Balaska"
diff -urN xpilot-4.U.4a3/src/server/cmdline.c xpilot-4.U.4tc99b/src/server/cmdline.c
--- xpilot-4.U.4a3/src/server/cmdline.c	Wed Sep 22 21:37:37 1999
+++ xpilot-4.U.4tc99b/src/server/cmdline.c	Wed Sep 22 20:45:18 1999
@@ -40,6 +40,7 @@
 #include "defaults.h"
 #include "error.h"
 #include "portability.h"
+#include "status.h"
 
 char cmdline_version[] = VERSION;
 
@@ -239,6 +240,13 @@
 char            *password;              /* password for operator status */
 int             numberOfRounds;         /* how many rounds to play */
 int             playerLimit;            /* allow less players than bases */
+/* BEGIN - TEAMCUP */
+bool            teamcup;                /* Is this a teamcup match? */
+char		*statServer;		/* Status server to report to */
+int		statPort;		/* Port to use on the status server */
+int		matchNumber;		/* The number of the match */
+/* END - TEAMCUP */
+
 
 const char default_map[] = DEFAULT_MAP;
 
@@ -2343,6 +2351,41 @@
 	tuner_dummy,
 	"Allow only (number of bases)-playerLimit players to enter.\n"
     }
+    /* BEGIN - TEAMCUP */
+    ,
+    {   "teamcup",
+	"teamcup",
+	false,
+	&teamcup,
+	valBool,
+	tuner_dummy,
+	"Is this a teamcup match?.\n"
+    },
+    {   "statServer",
+	"statServer",
+	"rubin.e.kth.se",
+	&statServer,
+	valString,
+	tuner_dummy,
+	"Status server to report to.\n"
+    },
+    {   "statPort",
+	"statPort",
+	STATUS_PORTSTR,
+	&statPort,
+	valInt,
+	tuner_dummy,
+	"Port of the status server.\n"
+    },
+    {   "match",
+	"match",
+	"-1",
+	&matchNumber,
+	valInt,
+	tuner_dummy,
+	"The number of the match.\n"
+    }
+    /* END - TEAMCUP */
 };
 
 
@@ -2511,7 +2554,7 @@
 
 void Parser(int argc, char **argv)
 {
-    int			i, j;
+    int			i, j, gotmatch = 0;
     char		*fname;
 
 
@@ -2541,6 +2584,9 @@
 	    puts(TITLE);
 	    IFNWINDOWS( exit(0); )
 	}
+	if (strcmp("-match", argv[i]) == 0 && i + 1 != argc) {
+		gotmatch = 1;
+	}
 
 	if (argv[i][0] == '-' || argv[i][0] == '+') {
 	    for (j = 0; j < NELEM(options); j++) {
@@ -2571,6 +2617,12 @@
 	}
 	errno = 0;
 	error("Unknown option '%s'", argv[i]);
+    }
+    if (!gotmatch) {
+	    xpprintf("\n\n"
+	"!!! You must use the '-match' option to start this server.\n"
+	"!!! To practise you may use '-match 0'.\n\n\n");
+	    End_game();
     }
 
     /*
diff -urN xpilot-4.U.4a3/src/server/event.c xpilot-4.U.4tc99b/src/server/event.c
--- xpilot-4.U.4a3/src/server/event.c	Wed Sep 22 21:37:37 1999
+++ xpilot-4.U.4tc99b/src/server/event.c	Sat Sep 18 20:31:16 1999
@@ -719,7 +719,7 @@
 		    }
 		} else {
 		    if ((*l!=NOT_CONNECTED)
-			    && Player_lock_allowed(ind, GetInd[*l])) {
+			&& Player_lock_allowed(ind, GetInd[*l])) {
 			pl->lock.pl_id = *l;
 			SET_BIT(pl->lock.tagged, LOCK_PLAYER);
 		    }
diff -urN xpilot-4.U.4a3/src/server/frame.c xpilot-4.U.4tc99b/src/server/frame.c
--- xpilot-4.U.4a3/src/server/frame.c	Wed Sep 22 21:37:37 1999
+++ xpilot-4.U.4tc99b/src/server/frame.c	Mon Aug 30 00:59:46 1999
@@ -994,6 +994,9 @@
     } else {
 	msg = message;
     }
+    /* BEGIN - TEAMCUP */
+    teamcup_log("    %s\n", message);
+    /* END - TEAMCUP */
     for (i = 0; i < NumPlayers; i++) {
 	pl = Players[i];
 	if (pl->conn != NOT_CONNECTED) {
diff -urN xpilot-4.U.4a3/src/server/global.h xpilot-4.U.4tc99b/src/server/global.h
--- xpilot-4.U.4a3/src/server/global.h	Wed Sep 22 21:37:37 1999
+++ xpilot-4.U.4tc99b/src/server/global.h	Wed Sep 22 20:45:18 1999
@@ -252,6 +252,33 @@
 extern char             *password;
 extern int              numberOfRounds;
 extern int              playerLimit;
+extern char		*statServer;
+extern int		statPort;
+extern int		matchNumber;
+
+/* BEGIN - TEAMCUP */
+extern FILE		*teamcup_score_file;
+extern bool		teamcup;
+#if !defined(STDVA)
+#   if defined(__STDC__) && !defined(__sun__) || defined(__cplusplus)
+#	define STDVA	1		/* has ANSI stdarg stuff */
+#   else
+#	define STDVA	0		/* nope, still the K&R way */
+#   endif
+#endif
+#if STDVA
+void teamcup_log(const char *fmt, ...);
+#else
+void teamcup_log();
+#endif
+void teamcup_round_start();
+void teamcup_round_end(int winning_team);
+void teamcup_open_score_file();
+void teamcup_close_score_file();
+
+extern int			teamcup_match_inited;
+extern int			teamcup_status_fd;
+/* END - TEAMCUP */
 #endif
 
 #endif /* GLOBAL_H */
diff -urN xpilot-4.U.4a3/src/server/netserver.c xpilot-4.U.4tc99b/src/server/netserver.c
--- xpilot-4.U.4a3/src/server/netserver.c	Wed Sep 22 21:37:37 1999
+++ xpilot-4.U.4tc99b/src/server/netserver.c	Wed Sep 22 20:44:48 1999
@@ -2024,9 +2024,11 @@
 	pl->turnspeed_s = power;
 	break;
     case PKT_TURNRESISTANCE:
+	if (!BIT(pl->used, OBJ_AUTOPILOT) && !BIT(pl->status, HOVERPAUSE))
 	pl->turnresistance = power;
 	break;
     case PKT_TURNRESISTANCE_S:
+	if (!BIT(pl->used, OBJ_AUTOPILOT) && !BIT(pl->status, HOVERPAUSE))
 	pl->turnresistance_s = power;
 	break;
     default:
@@ -2878,7 +2880,7 @@
       break;
 
     case VERSION_CMD:
-      sprintf(msg,"Xpilot 4.1.0 + patch 4.U.4alpha2");
+      sprintf(msg,"Xpilot 4.U.4TC99b");
       break;
 
     case HELP_CMD:
@@ -2906,6 +2908,11 @@
 	  gameDuration = 0;
 	sprintf(msg," < Total reset by %s! >",pl->name);
 	Set_message(msg);
+	/* BEGIN - TEAMCUP */
+	teamcup_close_score_file();
+	teamcup_open_score_file();
+	teamcup_round_start();
+	/* END - TEAMCUP */
 	return;
       }
       else {
@@ -3349,7 +3356,7 @@
 	return n;
     }
     pl = Players[GetInd[connp->id]];
-    if (BIT(pl->used, OBJ_AUTOPILOT))
+    if (BIT(pl->used, OBJ_AUTOPILOT) && !BIT(pl->status, HOVERPAUSE))
 	Autopilot(GetInd[connp->id], 0);
     turnspeed = movement * pl->turnspeed / MAX_PLAYER_TURNSPEED;
     if (turnspeed < 0) {
diff -urN xpilot-4.U.4a3/src/server/player.c xpilot-4.U.4tc99b/src/server/player.c
--- xpilot-4.U.4a3/src/server/player.c	Wed Sep 22 21:37:38 1999
+++ xpilot-4.U.4tc99b/src/server/player.c	Wed Sep 22 20:45:18 1999
@@ -44,6 +44,7 @@
 #include "saudio.h"
 #include "error.h"
 #include "objpos.h"
+#include "status.h"
 
 char player_version[] = VERSION;
 
@@ -890,6 +891,11 @@
   if (roundCounter==numberOfRounds)
     Game_Over();
   roundCounter++;
+
+  /* BEGIN - TEAMCUP */
+  teamcup_round_start();
+  /* END - TEAMCUP */
+
   return;
 }
 
@@ -956,6 +962,10 @@
 	}
     }
 
+    /* BEGIN - TEAMCUP */
+    teamcup_round_end(winning_team);
+    /* END - TEAMCUP */
+
     Reset_all_players();
 
     Count_rounds();
@@ -1031,8 +1041,6 @@
 
     Reset_all_players();
 
-    Count_rounds();
-
     free(best_players);
 }
 
@@ -1876,3 +1884,119 @@
     pl->used	&= ~(USED_KILL);
     pl->used	&= pl->have;
 }
+
+/* BEGIN - TEAMCUP */
+void teamcup_round_start()
+{
+  if (!teamcup)
+    return;
+
+  teamcup_log("\nRound %d\n", roundCounter);
+}
+
+void teamcup_round_end(int winning_team)
+{
+  int i;
+  int j;
+  int *list;
+  int team_score[MAX_TEAMS];
+  int team_players[MAX_TEAMS];
+  int best_score;
+  int best;
+  player *pl;
+
+  if (!teamcup)
+    return;
+
+  list = malloc(NumPlayers * sizeof(int));
+  if (list == NULL) {
+    error("Can't allocate memory for list");
+    End_game();
+  }
+
+  for (i = 0; i < NumPlayers; i++)
+    list[i] = i;
+
+  for (i = 0; i < MAX_TEAMS; i++)
+    team_score[i] = INT_MAX;
+
+  for (i = 0; i < MAX_TEAMS; i++)
+    team_players[i] = 0;
+
+  for (i = 0; i < NumPlayers; i++) {
+    best = NumPlayers;
+    for (j = 0; j < NumPlayers; j++) {
+      if (list[j] == NumPlayers)
+	continue;
+      pl = Players[j];
+      if (best == NumPlayers || pl->score > best_score) {
+	best_score = pl->score;
+	best = j;
+      }
+    }
+
+    list[best] = NumPlayers;
+    pl = Players[best];
+    teamcup_log("%d\t%d\t%2d/%d\t%s\n", pl->team, pl->score, pl->kills,
+	     pl->deaths, pl->name);
+
+    if (team_score[pl->team] == INT_MAX)
+      team_score[pl->team] = 0;
+    team_score[pl->team] += pl->score;
+    team_players[pl->team]++;
+  }
+
+  for (i = 0; i < MAX_TEAMS; i++)
+    if (team_score[i] != INT_MAX)
+      teamcup_log("Team %d\t%d\n", i, team_score[i]);
+  if (teamcup_score_file != NULL)
+    fflush(teamcup_score_file);
+
+  if (teamcup_status_fd) {
+      struct round_end rend;
+
+      if (!teamcup_match_inited) {
+	  struct match_init minit;
+
+	  minit.magic = htons(INIT_MATCH_MAGIC);
+	  minit.matchno = htons(matchNumber);
+	  minit.t2players = team_players[2];
+	  minit.t4players = team_players[4];
+	  write(teamcup_status_fd, &minit, sizeof(minit));
+
+	  for (i = 0; i < NumPlayers; i++) {
+	      struct player_init pinit;
+
+	      pl = Players[i];
+	      pinit.magic = htons(INIT_PLAYER_MAGIC);
+	      pinit.id = htons(i);
+	      pinit.team = pl->team;
+	      pinit.namelen = strlen(pl->name);
+	      write(teamcup_status_fd, &pinit, sizeof(pinit));
+	      write(teamcup_status_fd, &pl->name, pinit.namelen);
+	  }
+
+	  teamcup_match_inited = 1;
+      }
+
+      for (i = 0; i < NumPlayers; i++) {
+	  struct player_status pstat;
+
+	  pl = Players[i];
+	  pstat.magic = htons(PLAYER_STATUS_MAGIC);
+	  pstat.id = htons(i);
+	  pstat.score = htons(pl->score);
+	  pstat.kills = pl->kills;
+	  pstat.deaths = pl->deaths;
+	  write(teamcup_status_fd, &pstat, sizeof(pstat));
+      }
+
+      rend.magic = htons(ROUND_END_MAGIC);
+      rend.roundno = roundCounter;
+      rend.winner = winning_team;
+      write(teamcup_status_fd, &rend, sizeof(rend));
+  }
+
+  free(list);
+}
+/* END - TEAMCUP */
diff -urN xpilot-4.U.4a3/src/server/server.c xpilot-4.U.4tc99b/src/server/server.c
--- xpilot-4.U.4a3/src/server/server.c	Wed Sep 22 21:37:38 1999
+++ xpilot-4.U.4tc99b/src/server/server.c	Wed Sep 22 20:45:18 1999
@@ -70,6 +70,8 @@
 #include "portability.h"
 #include "server.h"
 
+#include "status.h"
+
 char server_version[] = VERSION;
 
 #ifndef	lint
@@ -116,6 +118,189 @@
 extern void Main_loop(void);
 static void Handle_signal(int sig_no);
 
+/* BEGIN - TEAMCUP */
+FILE			*teamcup_score_file = NULL;
+char			*teamcup_score_file_name = NULL;
+int			teamcup_match_inited = 0;
+int			teamcup_have_fork = 0;
+int			teamcup_status_fd = -1;
+int			teamcup_child_pid = 1;	/* Set to 1 so we don't send
+						   any dangerous pid to kill */
+
+#define STATUSBUFS	8
+#define STATBUFSIZE		512
+static void
+teamcup_status_thread(int readfd)
+{
+    char buf[STATUSBUFS][STATBUFSIZE], *bufptr[STATUSBUFS];
+    int len[STATUSBUFS];
+    int sockfd;
+    int wrbuf, rdbuf, maxfd, i;
+
+    for (i = 0; i < 64; i++) {
+	signal(i, _exit);
+    }
+    sockfd = CreateClientSocket(statServer, statPort);
+    if (sockfd < 0) {
+	xpprintf("\n!!! Unable to connect to master server\n\n");
+	_exit(1);
+    }
+
+    wrbuf = 0;
+    rdbuf = 0;
+    for (i = 0; i < STATUSBUFS; i++) {
+	bufptr[i] = NULL;
+	len[i] = 0;
+    }
+
+    /* Read first block of data */
+    do {
+	len[rdbuf] = read(readfd, buf[rdbuf], STATBUFSIZE);
+    } while (len[rdbuf] <= 0);
+    bufptr[rdbuf] = buf[rdbuf];
+    rdbuf++;
+
+    if (readfd > sockfd) maxfd = readfd + 1;
+    else maxfd = sockfd + 1;
+
+    while (1) {
+	fd_set rfds, wfds;
+	int dowr = 0;
+
+	FD_ZERO(&rfds);
+	FD_SET(readfd, &rfds);
+	if (bufptr[wrbuf]) {
+	    FD_ZERO(&wfds);
+	    FD_SET(sockfd, &wfds);
+	    dowr = 1;
+	}
+	do {
+	    FD_ZERO(&rfds);
+	    FD_SET(readfd, &rfds);
+	    if (bufptr[wrbuf]) {
+		FD_ZERO(&wfds);
+		FD_SET(sockfd, &wfds);
+		dowr = 1;
+	    }
+	} while (select(maxfd, &rfds, (dowr ? &wfds : NULL), NULL, NULL) <= 0);
+	if (dowr && FD_ISSET(sockfd, &wfds)) {
+	    int ret;
+
+	    ret = write(sockfd, bufptr[wrbuf], len[wrbuf]);
+	    if (ret < 0) ret = 0;
+	    len[wrbuf] -= ret;
+	    bufptr[wrbuf] += ret;
+	    if (len[wrbuf] <= 0) {
+		bufptr[wrbuf] = NULL;
+		wrbuf++;
+		if (wrbuf >= STATUSBUFS) wrbuf = 0;
+	    }
+	}
+	if (FD_ISSET(readfd, &rfds)) {
+	    int ret;
+
+	    if (bufptr[rdbuf] != NULL) {
+		char dummybuf[STATBUFSIZE];
+
+		read(readfd, dummybuf, STATBUFSIZE);
+		continue;
+	    }
+	    ret = read(readfd, buf[rdbuf], STATBUFSIZE);
+	    if (ret <= 0) continue;
+	    len[rdbuf] = ret;
+	    bufptr[rdbuf] = buf[rdbuf];
+	    rdbuf++;
+	    if (rdbuf >= STATUSBUFS) rdbuf = 0;
+	}
+    }
+}
+
+
+void teamcup_open_score_file()
+{
+  if (!teamcup)
+    return;
+
+  if (teamcup_score_file != NULL) {
+    error("teamcup_score_file != NULL");
+    End_game();
+  }
+  if (teamcup_score_file_name != NULL) {
+    error("teamcup_score_file_name != NULL");
+    End_game();
+  }
+
+  teamcup_score_file_name = tempnam(NULL, "teamcup-");
+  if (teamcup_score_file_name == NULL) {
+    error("tempnam() failed, could not create score file name");
+    End_game();
+  }
+  teamcup_score_file = fopen(teamcup_score_file_name, "w");
+  if (teamcup_score_file == NULL) {
+    error("fopen() failed, could not create score file");
+    End_game();
+  }
+  xpprintf("score file is \"%s\".\n", teamcup_score_file_name);
+
+  teamcup_log("%s\n",
+	   "1) Fill the names of the teams below.\n"
+	   "2) Fill the team number of total winner only if this was the second match.\n"
+	   "3) Send this file to <mackan@stacken.kth.se> with subject TC99-RESULT\n"
+	   "4) Copy this file in a safe place.  Do not delete it after sending.\n"
+	   "\nTeam 2 name: \n"
+	   "Team 4 name: \n"
+	   "Total winner (team number): \n"
+	   "\nDO NOT CHANGE ANYTHING AFTER THIS LINE\n"
+    );
+
+  if (matchNumber && !teamcup_have_fork) {
+      int mypipes[2];
+
+      if (pipe(mypipes) != 0) {
+	  xpprintf("Unable to create pipes!\n");
+	  End_game();
+      }
+
+      teamcup_status_fd = mypipes[1];
+      teamcup_child_pid = fork();
+      switch (teamcup_child_pid) {
+      case -1:
+	  teamcup_child_pid = 1;
+	  xpprintf("Unable to fork!\n");
+	  End_game();
+	  break;
+      case 0:
+	  teamcup_child_pid = 1;
+	  teamcup_status_thread(mypipes[0]);
+	  break;
+      default:
+	  break;
+      }
+      teamcup_have_fork = 1;
+  }
+  teamcup_match_inited = 0;
+}
+
+void teamcup_close_score_file()
+{
+  char msg[MSG_LEN];
+
+  if (!teamcup || teamcup_score_file == NULL)
+    return;
+
+  fclose(teamcup_score_file);
+
+  sprintf(msg,"score file \"%s\" closed", teamcup_score_file_name);
+  Set_message(msg);
+  xpprintf("%s\n", msg);
+
+  free(teamcup_score_file_name);
+
+  teamcup_score_file_name = NULL;
+  teamcup_score_file = NULL;
+}
+/* END - TEAMCUP */
+
 int main(int argc, char **argv)
 {
 
@@ -204,7 +389,10 @@
 #ifndef SILENT
     xpprintf("%s Server runs at %d frames per second\n", showtime(), framesPerSecond);
 #endif
-
+    /* BEGIN - TEAMCUP */
+    teamcup_open_score_file();
+    teamcup_round_start();
+    /* END - TEAMCUP */
 #ifdef	_WINDOWS
     /* Windows returns here, we let the worker thread call sched() */
     install_timer_tick(ServerThreadTimerProc, timerResolution?timerResolution:FPS);
@@ -297,6 +485,10 @@
 	sprintf(msg, "server exiting");
     }
 
+    /* BEGIN - TEAMCUP */
+    teamcup_close_score_file();
+    /* END - TEAMCUP */
+
     while (NumPlayers > 0) {	/* Kick out all remaining players */
 	pl = Players[NumPlayers - 1];
 	if (pl->conn == NOT_CONNECTED) {
@@ -317,6 +509,10 @@
     Free_cells();
     Log_game("END");			    /* Log end */
 
+    if (teamcup_child_pid != 0) {
+	kill(teamcup_child_pid, SIGINT);
+    }
+
 #ifndef	_WINDOWS
     exit (0);
 #endif
@@ -626,6 +822,18 @@
 
     Set_message("Game over...");
 
+    /* BEGIN - TEAMCUP */
+    if (teamcup_status_fd) {
+	struct match_end mend;
+
+	mend.magic = htons(END_MATCH_MAGIC);
+	mend.matchno = htons(matchNumber);
+	write(teamcup_status_fd, &mend, sizeof(mend));
+    }
+
+    teamcup_close_score_file();
+    /* END - TEAMCUP */
+
     /*
      * Hack to prevent Compute_Game_Status from starting over again...
      */
@@ -844,3 +1052,29 @@
 {
     pLockServer = (plock_server(pLockServer) == 1) ? true : false;
 }
+
+/* BEGIN - TEAMCUP */
+#if STDVA
+void teamcup_log(const char *fmt, ...)
+#else
+void teamcup_log(va_alist)
+    va_dcl
+#endif
+{
+  va_list ap;
+  
+#if STDVA
+    va_start(ap, fmt);
+#else
+    char		*fmt;
+
+    va_start(ap);
+    fmt = va_arg(ap, char *);
+#endif
+  if (!teamcup || teamcup_score_file == NULL)
+    return;
+
+  vfprintf(teamcup_score_file, fmt, ap);
+  va_end(ap);
+}
+/* END - TEAMCUP */
diff -urN xpilot-4.U.4a3/src/server/status.h xpilot-4.U.4tc99b/src/server/status.h
--- xpilot-4.U.4a3/src/server/status.h	Thu Jan  1 01:00:00 1970
+++ xpilot-4.U.4tc99b/src/server/status.h	Sun Sep 19 23:25:25 1999
@@ -0,0 +1,105 @@
+#ifndef _STATUS_STATUS_H
+#define _STATUS_STATUS_H
+
+#include "const.h"
+
+typedef unsigned int	ux32;
+typedef unsigned short	ux16;
+typedef unsigned char	ux8;
+
+typedef signed int	sx32;
+typedef signed short	sx16;
+typedef signed char	sx8;
+
+
+#define MAX_MATCHES	256
+#define STATUS_PORTNO	3749
+#define STATUS_PORTSTR	"3749"
+
+
+struct player_info {
+	int	matchno;
+	int	id;
+	ux8	team;
+	ux8	namelen;
+	ux8	name[MAX_CHARS];
+	sx16	score;
+	ux16	last_kills;
+	ux16	last_deaths;
+	ux16	total_kills;
+	ux16	total_deaths;
+};
+
+
+struct match_info {
+	ux32	inet_addr;
+	char	addr_str[16];
+	int	matchno;
+	int	finished;
+	int	inited;
+	int	lastround;
+	int	lastwinner;
+	int	fd;
+	char	t2name[MAX_CHARS];
+	char	t4name[MAX_CHARS];
+	ux8	t2players;
+	ux8	t4players;
+	sx16	t2score;
+	sx16	t4score;
+	struct player_info *team2;
+	struct player_info *team4;
+};
+
+
+#define INIT_MATCH_MAGIC	0xada0
+#define END_MATCH_MAGIC		0x6daf
+#define ROUND_END_MAGIC		0x0f41
+#define INIT_PLAYER_MAGIC	0xfeed
+#define PLAYER_STATUS_MAGIC	0xa537
+
+struct match_init {
+	ux16	magic;
+	ux16	matchno;
+	ux8	t2players;
+	ux8	t4players;
+	ux8	pad[2];
+};
+
+
+struct match_end {
+	ux16	magic;
+	ux16	matchno;
+};
+
+
+struct player_init {
+	ux16	magic;
+	ux16	id;
+	ux8	team;
+	ux8	namelen;
+	ux8	pad[2];
+	/* Name here */
+};
+
+
+struct round_end {
+	ux16	magic;
+	ux8	roundno;
+	ux8	winner;
+	ux8	by;
+#define	BY_DRAW		0
+#define BY_BALL		1
+#define BY_ALIVE	2
+	ux8	pad[3];
+};
+
+
+struct player_status {
+	ux16	magic;
+	ux16	id;
+	sx16	score;
+	ux8	kills;
+	ux8	deaths;
+};
+
+#endif /* _STATUS_STATUS_H */
