X-Git-Url: https://jxself.org/git/?p=super-star-trek.git;a=blobdiff_plain;f=src%2Fbattle.c;h=223a981b094037ef038a5584f44999b1b7f12f73;hp=71a8202a441f8a378d717bd1e05ead849302f0a5;hb=4d9c5a57b2a16c3c4bc54ab3f897f79101337eb5;hpb=05845f1a048926f08b0df44ed8c729a8797a2d85 diff --git a/src/battle.c b/src/battle.c index 71a8202..223a981 100644 --- a/src/battle.c +++ b/src/battle.c @@ -792,7 +792,8 @@ void deadkl(coord w, feature type, coord mv) if ((game.state.remkl + game.state.remcom + game.state.nscrem)==0) return; - game.state.remtime = game.state.remres/(game.state.remkl + 4*game.state.remcom); + game.state.remtime = game.state.remkl + game.state.remcom > 0 ? + game.state.remres/(game.state.remkl + 4*game.state.remcom) : 99; /* Remove enemy ship from arrays describing local conditions */ if (is_scheduled(FCDBAS) && same(game.battle, game.quadrant) && type==IHC) @@ -838,8 +839,8 @@ static bool targetcheck(double x, double y, double *course) return false; } -void photon(void) -/* launch photon torpedo */ +void torps(void) +/* launch photon torpedo salvo */ { double targ[4][3], course[4]; double r, dummy;