Fix defense value of intercepted missiles and satellites

Use the plane's defense value, not the plane type's base value.
This commit is contained in:
Markus Armbruster 2009-10-10 18:15:22 -04:00
parent 81163f9f20
commit de2fae0ee6
2 changed files with 3 additions and 4 deletions

View file

@ -313,7 +313,6 @@ launch_missile(struct plnstr *pp, int sublaunch)
static int
launch_sat(struct plnstr *pp)
{
struct plchrstr *pcp = plchr + pp->pln_type;
coord sx, sy;
int i;
int dist;
@ -361,7 +360,7 @@ launch_sat(struct plnstr *pp)
pr("Your trajectory was a little off.\n");
}
nreport(player->cnum, N_LAUNCH, 0, 1);
if (msl_intercept(sx, sy, pp->pln_own, pcp->pl_def, 0, P_O, 0)) {
if (msl_intercept(sx, sy, pp->pln_own, pln_def(pp), 0, P_O, 0)) {
return RET_OK;
}
pp->pln_x = sx;