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
/
battle.c
diff --git
a/src/battle.c
b/src/battle.c
index dba9f295c13a762a20a5c78056af1eb4de7b3b07..a1bacfab1a672ad652e3230247f4b6109c463104 100644
(file)
--- a/
src/battle.c
+++ b/
src/battle.c
@@
-409,10
+409,7
@@
void torpedo(double course, double r, int inx, int iny, double *hit, int i, int
game.ithere = false;
game.tholian.x = game.tholian.y = 0;
game.nenhere--;
game.ithere = false;
game.tholian.x = game.tholian.y = 0;
game.nenhere--;
- {
- coord dummy;
- dropin(IHBLANK, &dummy);
- }
+ dropin(IHBLANK);
return;
default: /* Problem! */
return;
default: /* Problem! */
@@
-430,9
+427,10
@@
void torpedo(double course, double r, int inx, int iny, double *hit, int i, int
if (shoved) {
game.quad[w.x][w.y]=IHDOT;
game.quad[jx][jy]=iquad;
if (shoved) {
game.quad[w.x][w.y]=IHDOT;
game.quad[jx][jy]=iquad;
+ w.x = jx; w.y = jy;
prout(_(" displaced by blast to %s "), cramlc(sector, w));
for_local_enemies(ll)
prout(_(" displaced by blast to %s "), cramlc(sector, w));
for_local_enemies(ll)
- game.kdist[ll] = game.kavgd[ll] =
sqrt(square(game.sector.x-game.ks[ll].x)+square(game.sector.y-game.ks[ll].y)
);
+ game.kdist[ll] = game.kavgd[ll] =
distance(game.sector,game.ks[ll]
);
sortkl();
return;
}
sortkl();
return;
}