projects
/
super-star-trek.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
bdcf854
)
Hide more origin differences.
author
Eric S. Raymond
<esr@thyrsus.com>
Mon, 7 Feb 2005 15:48:12 +0000
(15:48 +0000)
committer
Eric S. Raymond
<esr@thyrsus.com>
Mon, 7 Feb 2005 15:48:12 +0000
(15:48 +0000)
ai.c
patch
|
blob
|
history
battle.c
patch
|
blob
|
history
diff --git
a/ai.c
b/ai.c
index f1eca73a58c3614408429158dd4e3d99f45ba539..c141bbed6ef5d72024bd59a29d29806133afc82f 100644
(file)
--- a/
ai.c
+++ b/
ai.c
@@
-14,7
+14,7
@@
static int tryexit(int lookx, int looky, int ienm, int loccom, int irun)
if (irun == 0) {
/* avoid intruding on another commander's territory */
if (ienm == IHC) {
if (irun == 0) {
/* avoid intruding on another commander's territory */
if (ienm == IHC) {
- for
(l = 1; l <= game.state.remcom; l++
)
+ for
_commanders(l
)
if (game.state.cx[l]==iqx && game.state.cy[l]==iqy) return 0;
/* refuse to leave if currently attacking starbase */
if (batx==quadx && baty==quady) return 0;
if (game.state.cx[l]==iqx && game.state.cy[l]==iqy) return 0;
/* refuse to leave if currently attacking starbase */
if (batx==quadx && baty==quady) return 0;
@@
-54,7
+54,7
@@
static int tryexit(int lookx, int looky, int ienm, int loccom, int irun)
game.state.isy=iqy;
}
else {
game.state.isy=iqy;
}
else {
- for
(l=1; l<=game.state.remcom; l++
) {
+ for
_commanders(l
) {
if (game.state.cx[l]==quadx && game.state.cy[l]==quady) {
game.state.cx[l]=iqx;
game.state.cy[l]=iqy;
if (game.state.cx[l]==quadx && game.state.cy[l]==quady) {
game.state.cx[l]=iqx;
game.state.cy[l]=iqy;
@@
-436,7
+436,7
@@
void scom(int *ipage)
continue;
/* if there is a commander, an no other base is appropriate,
we will take the one with the commander */
continue;
/* if there is a commander, an no other base is appropriate,
we will take the one with the commander */
- for
(j = 1; j <= game.state.remcom; j++
) {
+ for
_commanders (j
) {
if (ibqx==game.state.cx[j] && ibqy==game.state.cy[j] && ifindit!= 2) {
ifindit = 2;
iwhichb = i;
if (ibqx==game.state.cx[j] && ibqy==game.state.cy[j] && ifindit!= 2) {
ifindit = 2;
iwhichb = i;
diff --git
a/battle.c
b/battle.c
index ef45ca275b001e9158f1f5a745920e09535c3f3e..549039999cdbf594490e157a670a81c466325d2b 100644
(file)
--- a/
battle.c
+++ b/
battle.c
@@
-633,7
+633,7
@@
void deadkl(int ix, int iy, int type, int ixx, int iyy)
switch (type) {
case IHC:
comhere = 0;
switch (type) {
case IHC:
comhere = 0;
- for
(i=1; i<=game.state.remcom; i++
)
+ for
_commanders (i
)
if (game.state.cx[i]==quadx && game.state.cy[i]==quady) break;
game.state.cx[i] = game.state.cx[game.state.remcom];
game.state.cy[i] = game.state.cy[game.state.remcom];
if (game.state.cx[i]==quadx && game.state.cy[i]==quady) break;
game.state.cx[i] = game.state.cx[game.state.remcom];
game.state.cy[i] = game.state.cy[game.state.remcom];