X-Git-Url: https://git.cameronkatri.com/bsdgames-darwin.git/blobdiff_plain/97e04d4fb9d218f2fb01cc75da027de2f4035be8..4fa17c6f9afc7c76d0350d5d9e5996391aa18137:/sail/parties.c diff --git a/sail/parties.c b/sail/parties.c index 28b266c9..43e94416 100644 --- a/sail/parties.c +++ b/sail/parties.c @@ -1,4 +1,4 @@ -/* $NetBSD: parties.c,v 1.8 2001/01/04 02:43:32 jwise Exp $ */ +/* $NetBSD: parties.c,v 1.12 2009/03/14 22:52:52 dholland Exp $ */ /* * Copyright (c) 1983, 1993 @@ -12,11 +12,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -38,16 +34,13 @@ #if 0 static char sccsid[] = "@(#)parties.c 8.2 (Berkeley) 4/28/95"; #else -__RCSID("$NetBSD: parties.c,v 1.8 2001/01/04 02:43:32 jwise Exp $"); +__RCSID("$NetBSD: parties.c,v 1.12 2009/03/14 22:52:52 dholland Exp $"); #endif #endif /* not lint */ +#include #include "extern.h" -int meleeing(struct ship *, struct ship *); -int boarding(struct ship *, int); -void unboard(struct ship *, struct ship *, int); - int meleeing(struct ship *from, struct ship *to) { @@ -78,7 +71,14 @@ unboard(struct ship *ship, struct ship *to, int isdefense) struct BP *p = isdefense ? ship->file->DBP : ship->file->OBP; int n; - for (n = 0; n < NBP; p++, n++) - if (p->turnsent && (p->toship == to || isdefense || ship == to)) - Write(isdefense ? W_DBP : W_OBP, ship, n, 0, 0, 0); + for (n = 0; n < NBP; p++, n++) { + if (p->turnsent && + (p->toship == to || isdefense || ship == to)) { + if (isdefense) { + send_dbp(ship, n, 0, 0, 0); + } else { + send_obp(ship, n, 0, 0, 0); + } + } + } }