Date: Thursday October 10, 2002 @ 20:24 Author: cameron Update of /home/netrek/cvsroot/Vanilla/ntserv In directory swashbuckler.real-time.com:/var/tmp/cvs-serv31131/ntserv Modified Files: main.c enter.c ntscmds.c Log Message: fix dock permissions logic **************************************** Index: Vanilla/ntserv/main.c diff -u Vanilla/ntserv/main.c:1.24 Vanilla/ntserv/main.c:1.25 --- Vanilla/ntserv/main.c:1.24 Fri Jun 21 02:41:35 2002 +++ Vanilla/ntserv/main.c Thu Oct 10 20:24:46 2002 @@ -60,7 +60,6 @@ int callHost=0; time_t starttime; int i; - register struct player *j; /* for traipsing through the playerlist */ extern void forceShutdown (); char pseudo[PSEUDOSIZE]; /* Was a global - MK 9/30/94 */ @@ -255,6 +254,7 @@ me->p_genoplanets=0; me->p_armsbomb=0; me->p_genoarmsbomb=0; + me->p_candock = 1; STRNCPY(me->p_login, login, NAME_LEN); me->p_login[NAME_LEN - 1] = '\0'; @@ -397,15 +397,6 @@ } } -#ifdef VOTING - /* reset eject voting to avoid inheriting this slot's last occupant's */ - /* escaped fate just in case the last vote comes through after the */ - /* old guy quit and the new guy joined -Villalpando req. by Cameron */ - for (i = 0, j = &players[i]; i < MAXPLAYER; i++, j++) - j->voting[me->p_no] = -1; -#endif - me->p_candock = 1; - me->p_transwarp = PFGREEN|PFYELLOW|PFRED; /* Get input until the player quits or dies */ living++; while (living) input(); Index: Vanilla/ntserv/enter.c diff -u Vanilla/ntserv/enter.c:1.11 Vanilla/ntserv/enter.c:1.12 --- Vanilla/ntserv/enter.c:1.11 Wed Oct 10 02:36:52 2001 +++ Vanilla/ntserv/enter.c Thu Oct 10 20:24:46 2002 @@ -47,7 +47,7 @@ int i; /* Use local variables, not the globals */ - struct player *me = &players[pno]; + struct player *me = &players[pno], *j; struct ship *myship = &me->p_ship; #if defined (ONCHECK) && !defined(ROBOT) @@ -130,12 +130,13 @@ } me->p_updates = 0; me->p_flags = PFSHIELD|PFGREEN; - if (s_type==STARBASE) - { + if (s_type == STARBASE) { me->p_flags |= PFDOCKOK; /* allow docking by default */ for(i = 0; i < MAXPLAYER; i++) - players[i].p_candock = 1; /* give everybody permission to dock */ - } + if (players[i].p_team = me->p_team) + players[i].p_candock = 1; /* give team permission to dock */ + } + me->p_transwarp = PFGREEN|PFYELLOW|PFRED; me->p_dir = 0; me->p_desdir = 0; me->p_speed = 0; @@ -190,6 +191,14 @@ me->p_hostile &= ~me->p_team; me->p_war = me->p_hostile; } + +#ifdef VOTING + /* reset eject voting to avoid inheriting this slot's last occupant's */ + /* escaped fate just in case the last vote comes through after the */ + /* old guy quit and the new guy joined -Villalpando req. by Cameron */ + for (i = 0, j = &players[i]; i < MAXPLAYER; i++, j++) + j->voting[me->p_no] = -1; +#endif /* join message stuff */ sprintf(me->p_mapchars,"%c%c",teamlet[me->p_team], shipnos[me->p_no]); Index: Vanilla/ntserv/ntscmds.c diff -u Vanilla/ntserv/ntscmds.c:1.24 Vanilla/ntserv/ntscmds.c:1.25 --- Vanilla/ntserv/ntscmds.c:1.24 Wed Aug 14 23:48:17 2002 +++ Vanilla/ntserv/ntscmds.c Thu Oct 10 20:24:46 2002 @@ -1,4 +1,4 @@ -/* $Id: ntscmds.c,v 1.24 2002/08/15 04:48:17 cameron Exp $ +/* $Id: ntscmds.c,v 1.25 2002/10/11 01:24:46 cameron Exp $ */ /* @@ -1214,12 +1214,6 @@ if (victim->p_status == PFREE) { pmessage(whofrom, MINDIV, addr, "dock: ignored, slot is free"); - return; - } - - if (p->p_team != victim->p_team) - { - pmessage(whofrom, MINDIV, addr, "dock: slot isn't on your team"); return; }