X-Git-Url: https://git.cameronkatri.com/bsdgames-darwin.git/blobdiff_plain/c10b9a8ce82ad7b4b287ccc5b5b576ab961aa488..82159d673f616b12554c28d5ac54f515fec21e91:/hunt/huntd/driver.c diff --git a/hunt/huntd/driver.c b/hunt/huntd/driver.c index 0abf364a..ff5411d9 100644 --- a/hunt/huntd/driver.c +++ b/hunt/huntd/driver.c @@ -1,4 +1,4 @@ -/* $NetBSD: driver.c,v 1.20 2009/08/12 07:42:11 dholland Exp $ */ +/* $NetBSD: driver.c,v 1.22 2013/10/19 17:23:08 christos Exp $ */ /* * Copyright (c) 1983-2003, Regents of the University of California. * All rights reserved. @@ -32,7 +32,7 @@ #include #ifndef lint -__RCSID("$NetBSD: driver.c,v 1.20 2009/08/12 07:42:11 dholland Exp $"); +__RCSID("$NetBSD: driver.c,v 1.22 2013/10/19 17:23:08 christos Exp $"); #endif /* not lint */ #include @@ -88,7 +88,7 @@ main(int ac, char **av, char **ep) PLAYER *pp; #ifdef INTERNET u_short msg; - short port_num, reply; + short reply; socklen_t namelen; SOCKET test; #endif @@ -143,7 +143,6 @@ again: #ifdef INTERNET if (fdset[2].revents & POLLIN) { namelen = DAEMON_SIZE; - port_num = htons(sock_port); (void) recvfrom(Test_socket, &msg, sizeof msg, 0, (struct sockaddr *) &test, &namelen); switch (ntohs(msg)) { @@ -412,7 +411,7 @@ init(void) fdset[2].fd = -1; #endif - Seed = getpid() + time((time_t *) NULL); + Seed = getpid() + time(NULL); makemaze(); #ifdef BOOTS makeboots(); @@ -599,7 +598,6 @@ zap(PLAYER *pp, FLAG was_player, int i) BULLET *bp; PLAYER *np; int x, y; - int savefd; if (was_player) { if (pp->p_undershot) @@ -622,8 +620,6 @@ zap(PLAYER *pp, FLAG was_player, int i) outstr(pp, pp->p_death, len); cgoto(pp, HEIGHT, 0); - savefd = pp->p_fd; - #ifdef MONITOR if (was_player) { #endif @@ -662,7 +658,7 @@ zap(PLAYER *pp, FLAG was_player, int i) } if (x > 0) { (void) add_shot(len, pp->p_y, pp->p_x, pp->p_face, x, - (PLAYER *) NULL, TRUE, SPACE); + NULL, TRUE, SPACE); (void) snprintf(Buf, sizeof(Buf), "%s detonated.", pp->p_ident->i_name); for (np = Player; np < End_player; np++) @@ -710,7 +706,7 @@ zap(PLAYER *pp, FLAG was_player, int i) y = rand_num(HEIGHT / 2) + HEIGHT / 4; } while (Maze[y][x] != SPACE); (void) add_shot(LAVA, y, x, LEFTS, volcano, - (PLAYER *) NULL, TRUE, SPACE); + NULL, TRUE, SPACE); for (np = Player; np < End_player; np++) message(np, "Volcano eruption."); volcano = 0; @@ -726,7 +722,7 @@ zap(PLAYER *pp, FLAG was_player, int i) add_shot(DSHOT, y, x, rand_dir(), shot_req[MINDSHOT + rand_num(MAXBOMB - MINDSHOT)], - (PLAYER *) NULL, FALSE, SPACE); + NULL, FALSE, SPACE); } #endif