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:
2c72290
)
Cleanup up after previous change.
author
Eric S. Raymond
<esr@thyrsus.com>
Mon, 7 Feb 2005 19:10:42 +0000
(19:10 +0000)
committer
Eric S. Raymond
<esr@thyrsus.com>
Mon, 7 Feb 2005 19:10:42 +0000
(19:10 +0000)
ai.c
patch
|
blob
|
history
setup.c
patch
|
blob
|
history
diff --git
a/ai.c
b/ai.c
index fd9cf8ceecedcc77db509c839758e6a6208b5128..d96f747315ebac25962de011493f328d814a85c8 100644
(file)
--- a/
ai.c
+++ b/
ai.c
@@
-370,8
+370,8
@@
void scom(int *ipage)
{
int i, i2, j, ideltax, ideltay, ibqx, ibqy, sx, sy, ifindit, iwhichb;
int iqx, iqy;
{
int i, i2, j, ideltax, ideltay, ibqx, ibqy, sx, sy, ifindit, iwhichb;
int iqx, iqy;
- int basetbl[BASEMAX];
- double bdist[BASEMAX];
+ int basetbl[BASEMAX
+1
];
+ double bdist[BASEMAX
+1
];
int flag;
#ifdef DEBUG
if (idebug) prout("SCOM");
int flag;
#ifdef DEBUG
if (idebug) prout("SCOM");
diff --git
a/setup.c
b/setup.c
index f50f7c41e02acd3333a257470da5cac1e498aace..fb03bde96be24a742fe96852a8b7d53b536c8560 100644
(file)
--- a/
setup.c
+++ b/
setup.c
@@
-261,7
+261,7
@@
void setup(int needprompt)
for (j = i-1; j > 0; j--) {
/* Improved placement algorithm to spread out bases */
double distq = square(ix-game.state.baseqx[j]) + square(iy-game.state.baseqy[j]);
for (j = i-1; j > 0; j--) {
/* Improved placement algorithm to spread out bases */
double distq = square(ix-game.state.baseqx[j]) + square(iy-game.state.baseqy[j]);
- if (distq < 6.0*(BASEMAX-inbase) && Rand() < 0.75) {
+ if (distq < 6.0*(BASEMAX
+1
-inbase) && Rand() < 0.75) {
contflag = TRUE;
#ifdef DEBUG
proutn("DEBUG: Abandoning base #%d at %d-%d\n", i, ix, iy);
contflag = TRUE;
#ifdef DEBUG
proutn("DEBUG: Abandoning base #%d at %d-%d\n", i, ix, iy);
@@
-269,7
+269,7
@@
void setup(int needprompt)
break;
}
#ifdef DEBUG
break;
}
#ifdef DEBUG
- else if (distq < 6.0 * (BASEMAX-inbase)) {
+ else if (distq < 6.0 * (BASEMAX
+1
-inbase)) {
proutn("DEBUG: saving base #%d, close to #%d\n", i, j);
}
#endif
proutn("DEBUG: saving base #%d, close to #%d\n", i, j);
}
#endif
@@
-469,7
+469,7
@@
int choose(int needprompt)
// Use parameters to generate initial values of things
damfac = 0.5 * skill;
// Use parameters to generate initial values of things
damfac = 0.5 * skill;
- game.state.rembase = 2.0 + Rand()*(
MAXBASES
-2.0);
+ game.state.rembase = 2.0 + Rand()*(
BASEMAX
-2.0);
inbase = game.state.rembase;
if (game.options & OPTION_PLANETS)
inplan = (PLNETMAX/2) + (PLNETMAX/2+1)*Rand();
inbase = game.state.rembase;
if (game.options & OPTION_PLANETS)
inplan = (PLNETMAX/2) + (PLNETMAX/2+1)*Rand();