Update of /cvsroot/netrek/server/Vanilla/tools
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26876/tools

Modified Files:
	Makefile.in xtkill.c 
Log Message:
bays

Index: Makefile.in
===================================================================
RCS file: /cvsroot/netrek/server/Vanilla/tools/Makefile.in,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- Makefile.in	22 Feb 2006 09:18:30 -0000	1.4
+++ Makefile.in	10 Apr 2006 10:56:33 -0000	1.5
@@ -21,14 +21,10 @@
 
 TOOLDIR= $(LIBDIR)/tools
 
-GETPATH = ../ntserv/getpath.o ../ntserv/data.o
-
 LINTFLAGS = -habxc $(EXTRAINCS) $(FLAGS)
 
-#     Memory Objects
-
-M_OBJS = ../ntserv/data.o ../ntserv/openmem.o ../ntserv/ltd_stats.o
-
+OBJS_SHM = ../ntserv/data.o ../ntserv/openmem.o ../ntserv/ltd_stats.o
+OBJS_PATH = ../ntserv/getpath.o ../ntserv/data.o
 
 SRCS = ${srcdir}/blotpassword.c ${srcdir}/loadchecker.c ${srcdir}/mess.c \
 	${srcdir}/mergescores.c \
@@ -43,7 +39,7 @@
 	${srcdir}/conq_vert.c ${srcdir}/../ntserv/slotmaint.c $(RANDOMC) \
 	${srcdir}/sortdb.c ${srcdir}/../robots/roboshar.c \
 	${srcdir}/../ntserv/smessage.c ${srcdir}/ntpasswd.c \
-	${srcdir}/../ntserv/salt.c
+	${srcdir}/../ntserv/salt.c ${srcdir}/../ntserv/bay.c 
 
 EXECS =	blotpassword loadchecker mess message newscores planets players \
 	scores \
@@ -93,85 +89,80 @@
 # cb_sock.o: packets.h ../ntserv/socket.c
 #	$(CC) -o ./cb_sock.o -g $(CFLAGS) -DCAMBOT -c ../ntserv/socket.c
 
-cambot: cambot.o $(M_OBJS) $(GETPATH)
-	$(CC) -o $@ $(CFLAGS) ${LDFLAGS} cambot.o ../ntserv/genspkt.o ../ntserv/sysdefaults.o ../ntserv/getship.o ../ntserv/warning.o ../ntserv/smessage.o ../ntserv/distress.o ../ntserv/util.o $(M_OBJS) ../ntserv/getpath.o  $(RSA_LIB)
+cambot: cambot.o $(OBJS_SHM) $(OBJS_PATH)
+	$(CC) -o $@ $(CFLAGS) ${LDFLAGS} cambot.o ../ntserv/genspkt.o ../ntserv/sysdefaults.o ../ntserv/getship.o ../ntserv/warning.o ../ntserv/smessage.o ../ntserv/distress.o ../ntserv/util.o $(OBJS_SHM) ../ntserv/getpath.o  $(RSA_LIB)
 
 sortdb: sortdb.o
 	$(CC) -o $@ $(CFLAGS) ${LDFLAGS} sortdb.o
 
-ntpasswd: ntpasswd.o $(GETPATH) ../ntserv/salt.o
-	$(CC) -o $@ $(CFLAGS) ${LDFLAGS} ntpasswd.o $(GETPATH) ../ntserv/salt.o $(LIBCRYPT)
+ntpasswd: ntpasswd.o $(OBJS_PATH) ../ntserv/salt.o
+	$(CC) -o $@ $(CFLAGS) ${LDFLAGS} ntpasswd.o $(OBJS_PATH) ../ntserv/salt.o $(LIBCRYPT)
 
-loadchecker: loadchecker.o $(M_OBJS)
-	$(CC) -o $@ $(CFLAGS) ${LDFLAGS} loadchecker.o $(M_OBJS) $(LIBS)
+loadchecker: loadchecker.o $(OBJS_SHM)
+	$(CC) -o $@ $(CFLAGS) ${LDFLAGS} loadchecker.o $(OBJS_SHM) $(LIBS)
 
-mess: mess.o $(M_OBJS)
-	$(CC) -o $@ $(CFLAGS) ${LDFLAGS} mess.o $(M_OBJS) $(LIBS)
+mess: mess.o $(OBJS_SHM)
+	$(CC) -o $@ $(CFLAGS) ${LDFLAGS} mess.o $(OBJS_SHM) $(LIBS)
 
-message: message.o $(M_OBJS)
-	$(CC) -o $@ $(CFLAGS) ${LDFLAGS} message.o $(M_OBJS) $(LIBS)
+message: message.o $(OBJS_SHM)
+	$(CC) -o $@ $(CFLAGS) ${LDFLAGS} message.o $(OBJS_SHM) $(LIBS)
 
-mergescores: mergescores.o $(GETPATH)
-	$(CC) -o $@ $(CFLAGS) ${LDFLAGS} mergescores.o $(GETPATH) $(LIBS)
+mergescores: mergescores.o $(OBJS_PATH)
+	$(CC) -o $@ $(CFLAGS) ${LDFLAGS} mergescores.o $(OBJS_PATH) $(LIBS)
 
-newscores: newscores.o $(GETPATH)
-	$(CC) -o $@ $(CFLAGS) ${LDFLAGS} newscores.o $(GETPATH) $(LIBS)
+newscores: newscores.o $(OBJS_PATH)
+	$(CC) -o $@ $(CFLAGS) ${LDFLAGS} newscores.o $(OBJS_PATH) $(LIBS)
 
-planets: planets.o $(M_OBJS)
-	$(CC) -o $@ $(CFLAGS) ${LDFLAGS} planets.o $(M_OBJS) $(LIBS)
+planets: planets.o $(OBJS_SHM)
+	$(CC) -o $@ $(CFLAGS) ${LDFLAGS} planets.o $(OBJS_SHM) $(LIBS)
 
-players: players.o $(M_OBJS) $(RANDOMO)
-	$(CC) -o $@ $(CFLAGS) ${LDFLAGS} players.o $(M_OBJS) $(RANDOMO) $(LIBS)
+players: players.o $(OBJS_SHM) $(RANDOMO)
+	$(CC) -o $@ $(CFLAGS) ${LDFLAGS} players.o $(OBJS_SHM) $(RANDOMO) $(LIBS)
 
-nuke: nuke.o $(M_OBJS) $(RANDOMO)
-	$(CC) -o $@ $(CFLAGS) ${LDFLAGS} nuke.o $(M_OBJS) $(RANDOMO) $(LIBS)
+nuke: nuke.o $(OBJS_SHM) $(RANDOMO)
+	$(CC) -o $@ $(CFLAGS) ${LDFLAGS} nuke.o $(OBJS_SHM) $(RANDOMO) $(LIBS)
 
-# some weird problem with the MIPS RISC compiler for DECstations...
-# gcc seems to compile working executables (TC)
-#
-scores: scores.o $(GETPATH)
-	$(CC) -o $@ $(CFLAGS) ${LDFLAGS} scores.o $(GETPATH) $(LIBS) ../ntserv/ltd_stats.o
-#	gcc -o $@ $(CFLAGS) -g scores.o -L/usr/users/terence/lib
-#	cp scores /usr/users/terence/bin/trekscores
+scores: scores.o $(OBJS_PATH)
+	$(CC) -o $@ $(CFLAGS) ${LDFLAGS} scores.o $(OBJS_PATH) $(LIBS) ../ntserv/ltd_stats.o
 
-setgalaxy: setgalaxy.o $(RANDOMO) $(M_OBJS)
-	$(CC) -o $@ $(CFLAGS) ${LDFLAGS} setgalaxy.o $(RANDOMO) $(M_OBJS) $(LIBS)
+setgalaxy: setgalaxy.o $(RANDOMO) $(OBJS_SHM)
+	$(CC) -o $@ $(CFLAGS) ${LDFLAGS} setgalaxy.o $(RANDOMO) $(OBJS_SHM) $(LIBS)
 
-showgalaxy: showgalaxy.o ../ntserv/distress.o $(M_OBJS)
-	$(CC) -o $@ $(CFLAGS) ${LDFLAGS} showgalaxy.o ../ntserv/distress.o $(M_OBJS) $(LIBS) $(LIBCURSES) $(LIBTERMCAP)
+showgalaxy: showgalaxy.o ../ntserv/distress.o $(OBJS_SHM)
+	$(CC) -o $@ $(CFLAGS) ${LDFLAGS} showgalaxy.o ../ntserv/distress.o $(OBJS_SHM) $(LIBS) $(LIBCURSES) $(LIBTERMCAP)
 
-stat: stat.o $(M_OBJS)
-	$(CC) -o $@ $(CFLAGS) ${LDFLAGS} stat.o $(M_OBJS) $(LIBS)
+stat: stat.o $(OBJS_SHM)
+	$(CC) -o $@ $(CFLAGS) ${LDFLAGS} stat.o $(OBJS_SHM) $(LIBS)
 
 blotpassword: blotpassword.o
-	$(CC) -o $@ $(CFLAGS) ${LDFLAGS} blotpassword.o $(GETPATH) $(LIBS)
+	$(CC) -o $@ $(CFLAGS) ${LDFLAGS} blotpassword.o $(OBJS_PATH) $(LIBS)
 
-trimscores: trimscores.o $(GETPATH)
-	$(CC) -o $@ $(CFLAGS) ${LDFLAGS} trimscores.o $(GETPATH) $(LIBS)
+trimscores: trimscores.o $(OBJS_PATH)
+	$(CC) -o $@ $(CFLAGS) ${LDFLAGS} trimscores.o $(OBJS_PATH) $(LIBS)
 
-watchmes: watchmes.o ../ntserv/distress.o $(M_OBJS)
-	$(CC) $(CFLAGS) ${LDFLAGS} watchmes.o ../ntserv/distress.o $(M_OBJS) $(LIBS) -o $@
+watchmes: watchmes.o ../ntserv/distress.o $(OBJS_SHM)
+	$(CC) $(CFLAGS) ${LDFLAGS} watchmes.o ../ntserv/distress.o $(OBJS_SHM) $(LIBS) -o $@
 
-xtkill: xtkill.o $(GETPATH) ../ntserv/getship.o ../ntserv/openmem.o ../ntserv/slotmaint.o ../ntserv/ltd_stats.o
-	$(CC) -o $@ $(CFLAGS) ${LDFLAGS} xtkill.o ../ntserv/getship.o ../ntserv/openmem.o ../ntserv/slotmaint.o ../ntserv/ltd_stats.o $(GETPATH) $(LIBS)
+xtkill: xtkill.o $(OBJS_SHM) $(OBJS_PATH) ../ntserv/getship.o ../ntserv/slotmaint.o ../ntserv/ltd_stats.o ../ntserv/bay.o
+	$(CC) -o $@ $(CFLAGS) ${LDFLAGS} xtkill.o ../ntserv/getship.o ../ntserv/openmem.o ../ntserv/slotmaint.o ../ntserv/ltd_stats.o ../ntserv/bay.o $(OBJS_PATH) $(LIBS)
 
-keyman: keyman.o $(GETPATH)
-	$(CC) -o $@ $(CFLAGS) ${LDFLAGS} keyman.o $(GETPATH) $(LIBS)
+keyman: keyman.o $(OBJS_PATH)
+	$(CC) -o $@ $(CFLAGS) ${LDFLAGS} keyman.o $(OBJS_PATH) $(LIBS)
 
-fun: $(RANDOMO) fun.o $(M_OBJS)
-	$(CC) -o $@ $(CFLAGS) ${LDFLAGS} fun.o $(RANDOMO) $(M_OBJS) $(LIBS)
+fun: $(RANDOMO) fun.o $(OBJS_SHM)
+	$(CC) -o $@ $(CFLAGS) ${LDFLAGS} fun.o $(RANDOMO) $(OBJS_SHM) $(LIBS)
 
-convert: $(GETPATH) convert.o
-	$(CC) -o $@ $(CFLAGS) ${LDFLAGS} convert.o $(GETPATH) $(LIBS)
+convert: $(OBJS_PATH) convert.o
+	$(CC) -o $@ $(CFLAGS) ${LDFLAGS} convert.o $(OBJS_PATH) $(LIBS)
 
-updated: update.o $(GETPATH)
-	$(CC) $(CFLAGS) ${LDFLAGS} -o updated update.o ../ntserv/ltd_stats.o $(GETPATH) $(EXTRALIBS)
+updated: update.o $(OBJS_PATH)
+	$(CC) $(CFLAGS) ${LDFLAGS} -o updated update.o ../ntserv/ltd_stats.o $(OBJS_PATH) $(EXTRALIBS)
 
 ltd_dump: ltd_dump.o
-	$(CC) $(CFLAGS) ${LDFLAGS} -o ltd_dump ltd_dump.o ../ntserv/ltd_stats.o $(GETPATH)
+	$(CC) $(CFLAGS) ${LDFLAGS} -o ltd_dump ltd_dump.o ../ntserv/ltd_stats.o $(OBJS_PATH)
 
 ltd_convert: ltd_convert.o
-	$(CC) $(CFLAGS) ${LDFLAGS} -o ltd_convert ltd_convert.o ../ntserv/ltd_stats.o $(GETPATH)
+	$(CC) $(CFLAGS) ${LDFLAGS} -o ltd_convert ltd_convert.o ../ntserv/ltd_stats.o $(OBJS_PATH)
 
 conq_vert: conq_vert.o
 	$(CC) -o $@ $(CFLAGS) ${LDFLAGS} conq_vert.o

Index: xtkill.c
===================================================================
RCS file: /cvsroot/netrek/server/Vanilla/tools/xtkill.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- xtkill.c	10 Apr 2006 04:24:51 -0000	1.4
+++ xtkill.c	10 Apr 2006 10:56:33 -0000	1.5
@@ -34,14 +34,8 @@
     me->p_desspeed = me->p_ship.s_maxspeed;
 
   /* bump all docked ships */
-  for (i=0; i<NUMPORTS; i++) 
-    if (me->p_port[i] != VACANT) {
-      players[me->p_port[i]].p_flags &= ~PFDOCK;
-      me->p_docked--;
-      me->p_port[i] = VACANT;	
-      me->p_flags |= PFDOCKOK;
-    }
-
+  bay_release_all(me);
+  me->p_flags |= PFDOCKOK;
 }
 
 int main(int argc, char **argv)
@@ -258,11 +252,8 @@
       me->p_flags &= ~PFCLOAK;
       /* set speed 0 */
       me->p_desspeed = 0;
-      if (me->p_flags & PFDOCK) {
-	players[me->p_docked].p_docked--;
-	players[me->p_docked].p_port[me->p_port[0]] = VACANT;
-      }
-      me->p_flags &= ~(PFREPAIR | PFBOMB | PFORBIT | PFDOCK | PFBEAMUP | PFBEAMDOWN);
+      bay_release(me);
+      me->p_flags &= ~(PFREPAIR | PFBOMB | PFORBIT | PFBEAMUP | PFBEAMDOWN);
       /* make unable to act */
       players[player].p_flags |= PFTWARP;
       /* show as puck */