Fix satellite coordinates screwup in launch

launch_sat() failed to normalize the satellite's coordinates when it
added a random course deviation.  Satellites with screwed up
coordinates were missed by skywatch, and possibly in other places.
This commit is contained in:
Markus Armbruster 2008-08-23 11:09:08 -04:00
parent 1ac95e0ed7
commit 5621f62302

View file

@ -384,8 +384,8 @@ launch_sat(struct plnstr *pp, int sublaunch)
i = pp->pln_tech + pp->pln_effic;
if (chance(1.0 - (i / (i + 50.0)))) {
dir = (random() % 6) + 1;
sx += diroff[dir][0];
sy += diroff[dir][1];
sx = xnorm(sx + diroff[dir][0]);
sy = ynorm(sy + diroff[dir][1]);
pr("Your trajectory was a little off.\n");
}
nreport(player->cnum, N_LAUNCH, 0, 1);