Clean up launch_sat() random direction pick
Use DIR_FIRST rather than literal 1.
This commit is contained in:
parent
cf5ba2cec1
commit
b288f62538
1 changed files with 1 additions and 1 deletions
|
@ -330,7 +330,7 @@ launch_sat(struct plnstr *pp)
|
||||||
}
|
}
|
||||||
i = pp->pln_tech + pp->pln_effic;
|
i = pp->pln_tech + pp->pln_effic;
|
||||||
if (chance(1.0 - (i / (i + 50.0)))) {
|
if (chance(1.0 - (i / (i + 50.0)))) {
|
||||||
dir = (random() % 6) + 1;
|
dir = DIR_FIRST + random() % 6;
|
||||||
sx = xnorm(sx + diroff[dir][0]);
|
sx = xnorm(sx + diroff[dir][0]);
|
||||||
sy = ynorm(sy + diroff[dir][1]);
|
sy = ynorm(sy + diroff[dir][1]);
|
||||||
pr("Your trajectory was a little off.\n");
|
pr("Your trajectory was a little off.\n");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue