annotate detonate.c @ 3:5a977ccbc7a9 default tip

Empty changelog
author darius
date Sat, 06 Dec 1997 05:41:29 +0000
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1 /* $Id: detonate.c,v 1.1.1.1 1997/12/06 05:41:29 darius Exp $ */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
2
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
3 /*
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
4 * detonate.c
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
5 */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
6 #include "copyright.h"
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
7
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
8 #include <stdio.h>
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
9 #include <sys/types.h>
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
10 #include "Wlib.h"
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
11 #include "defs.h"
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
12 #include "struct.h"
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
13 #include "data.h"
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
14 #include "proto.h"
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
15
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
16 /* Detonate torp */
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
17
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
18 void
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
19 detmine()
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
20 {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
21 if (paradise) {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
22 sendDetMineReq(-1);
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
23 } else {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
24 register int i;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
25
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
26 for (i = 0; i < ntorps; i++) {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
27 int j = i + me->p_no * ntorps;
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
28 if (torps[j].t_status == TMOVE ||
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
29 torps[j].t_status == TSTRAIGHT) {
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
30 sendDetMineReq(j);
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
31 }
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
32 }
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
33 }
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
34 }