diff options
author | Paul Janzen <pjanzen@cvs.openbsd.org> | 2000-09-24 21:55:27 +0000 |
---|---|---|
committer | Paul Janzen <pjanzen@cvs.openbsd.org> | 2000-09-24 21:55:27 +0000 |
commit | 654557dffeb038709ab092a1bb4d7cd2915b63fc (patch) | |
tree | 5f082621e7dec25217cfc7ea28a3e29228e9eeef /games/battlestar/com1.c | |
parent | 4ff27aafec200e4e31826c8b962d50681ce9f25e (diff) |
numerous changes from jsm@netbsd.org:
static where appropriate, add a few comments, format a bit better, and
deal with WEIGHT/CUMBER being zero (and not less).
Diffstat (limited to 'games/battlestar/com1.c')
-rw-r--r-- | games/battlestar/com1.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/games/battlestar/com1.c b/games/battlestar/com1.c index dbf9b76b2cc..1262e4c55bb 100644 --- a/games/battlestar/com1.c +++ b/games/battlestar/com1.c @@ -1,4 +1,4 @@ -/* $OpenBSD: com1.c,v 1.9 2000/07/24 01:02:43 pjanzen Exp $ */ +/* $OpenBSD: com1.c,v 1.10 2000/09/24 21:55:22 pjanzen Exp $ */ /* $NetBSD: com1.c,v 1.3 1995/03/21 15:06:51 cgd Exp $ */ /* @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)com1.c 8.2 (Berkeley) 4/28/95"; #else -static char rcsid[] = "$OpenBSD: com1.c,v 1.9 2000/07/24 01:02:43 pjanzen Exp $"; +static char rcsid[] = "$OpenBSD: com1.c,v 1.10 2000/09/24 21:55:22 pjanzen Exp $"; #endif #endif /* not lint */ @@ -212,11 +212,17 @@ news() WEIGHT = 0; } if (injuries[ARM] == 2) { - CUMBER -= 5; + if (CUMBER > 5) + CUMBER -= 5; + else + CUMBER = 0; injuries[ARM]++; } if (injuries[RIBS] == 2) { - CUMBER -= 2; + if (CUMBER > 2) + CUMBER -= 2; + else + CUMBER = 0; injuries[RIBS]++; } if (injuries[SPINE] == 2) { |