From b288f625385d2b9052610cea6ba0c1bba12f9c23 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Tue, 14 Aug 2012 20:33:36 +0200 Subject: [PATCH] Clean up launch_sat() random direction pick Use DIR_FIRST rather than literal 1. --- src/lib/commands/laun.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"); -- 2.43.0