projects
/
super-star-trek.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
More boolean cleanups. More consistent use of coord type
[super-star-trek.git]
/
src
/
moving.c
diff --git
a/src/moving.c
b/src/moving.c
index 52c6b504664450bc6a7a14c8d2c501bffe2365be..99c18916da63bfaea1a42a31084b3d08ea53e4b0 100644
(file)
--- a/
src/moving.c
+++ b/
src/moving.c
@@
-670,7
+670,7
@@
void setwrp(void)
game.warpfac = aaitem;
game.wfacsq=game.warpfac*game.warpfac;
if (game.warpfac <= oldfac || game.warpfac <= 6.0) {
game.warpfac = aaitem;
game.wfacsq=game.warpfac*game.warpfac;
if (game.warpfac <= oldfac || game.warpfac <= 6.0) {
- prout
n
(_("Helmsman Sulu- \"Warp factor %d, Captain.\""),
+ prout(_("Helmsman Sulu- \"Warp factor %d, Captain.\""),
(int)game.warpfac);
return;
}
(int)game.warpfac);
return;
}
@@
-945,12
+945,12
@@
void mayday(void)
game.nhelp++;
if (game.base.x!=0) {
/* There's one in this quadrant */
game.nhelp++;
if (game.base.x!=0) {
/* There's one in this quadrant */
- ddist =
sqrt(square(game.base.x-game.sector.x)+square(game.base.y-game.sector.y)
);
+ ddist =
distance(game.base, game.sector
);
}
else {
ddist = FOREVER;
for_starbases(m) {
}
else {
ddist = FOREVER;
for_starbases(m) {
- xdist
=10.0*sqrt(square(game.state.baseq[m].x-game.quadrant.x)+square(game.state.baseq[m].y-game.quadrant.y)
);
+ xdist
= QUADSIZE * distance(game.state.baseq[m], game.quadrant
);
if (xdist < ddist) {
ddist = xdist;
line = m;
if (xdist < ddist) {
ddist = xdist;
line = m;