From: Markus Armbruster Date: Tue, 14 Aug 2012 18:33:36 +0000 (+0200) Subject: Clean up launch_sat() random direction pick X-Git-Tag: v4.3.31~96 X-Git-Url: http://git.pond.sub.org/?p=empserver;a=commitdiff_plain;h=b288f625385d2b9052610cea6ba0c1bba12f9c23 Clean up launch_sat() random direction pick Use DIR_FIRST rather than literal 1. --- diff --git a/src/lib/commands/laun.c b/src/lib/commands/laun.c index 54cc05ff0..2cdfb9962 100644 --- a/src/lib/commands/laun.c +++ b/src/lib/commands/laun.c @@ -330,7 +330,7 @@ launch_sat(struct plnstr *pp) } i = pp->pln_tech + pp->pln_effic; if (chance(1.0 - (i / (i + 50.0)))) { - dir = (random() % 6) + 1; + dir = DIR_FIRST + random() % 6; sx = xnorm(sx + diroff[dir][0]); sy = ynorm(sy + diroff[dir][1]); pr("Your trajectory was a little off.\n");