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 @ 13:28
Author: unbelver
Update of /home/netrek/cvsroot/Vanilla/robots
In directory cvs.castle.real-time.com:/var/tmp/cvs-serv10687
Modified Files:
inlcomm.c
Log Message:
These two PROJECT file entries:
- freeing slot 16, should be "g".
- either captain should be able to free non-live slots on either team
[high]
Actually, either captain can free ANY slot now.
--Carlos V.
****************************************
Index: Vanilla/robots/inlcomm.c
diff -u Vanilla/robots/inlcomm.c:1.11 Vanilla/robots/inlcomm.c:1.12
--- Vanilla/robots/inlcomm.c:1.11 Thu Jun 17 02:52:51 1999
+++ Vanilla/robots/inlcomm.c Thu Jul 8 13:28:29 1999
@@ -959,6 +959,7 @@
{
int num=-1;
int victim;
+ char slot;
struct player *j;
int who = mess->m_from;
@@ -967,6 +968,7 @@
if ((victim = getplayer(who, comm)) == -1)
return 0;
+#ifdef nodef
/* if the captain tries to free a slot on the other team, deny it */
if (
( players[who].w_queue == QU_HOME &&
@@ -981,6 +983,7 @@
"That slot is on the other team.");
return 1;
}
+#endif
j = &players[victim];
if (j->p_status==PFREE)
@@ -989,16 +992,19 @@
"Slot is already free.");
return 1;
}
-
+
+ /* convert slot # to slot character */
+ slot = (victim < 10) ? '0' + victim : 'a' + (victim - 10);
+
if (j->p_process)
{
kill(j->p_process, SIGTERM);
- pmessage(0, MALL, inl_from, "Freeing slot %i .", victim);
+ pmessage(0, MALL, inl_from, "Freeing slot %c ", slot);
return 1;
}
/* paranoia */
freeslot(j);
- pmessage(0, MALL, inl_from, "Freed slot %i .", victim);
+ pmessage(0, MALL, inl_from, "Freed slot %c ", slot);
return 1;
}