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:
parent
81163f9f20
commit
de2fae0ee6
2 changed files with 3 additions and 4 deletions
|
@ -313,7 +313,6 @@ launch_missile(struct plnstr *pp, int sublaunch)
|
||||||
static int
|
static int
|
||||||
launch_sat(struct plnstr *pp)
|
launch_sat(struct plnstr *pp)
|
||||||
{
|
{
|
||||||
struct plchrstr *pcp = plchr + pp->pln_type;
|
|
||||||
coord sx, sy;
|
coord sx, sy;
|
||||||
int i;
|
int i;
|
||||||
int dist;
|
int dist;
|
||||||
|
@ -361,7 +360,7 @@ launch_sat(struct plnstr *pp)
|
||||||
pr("Your trajectory was a little off.\n");
|
pr("Your trajectory was a little off.\n");
|
||||||
}
|
}
|
||||||
nreport(player->cnum, N_LAUNCH, 0, 1);
|
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;
|
return RET_OK;
|
||||||
}
|
}
|
||||||
pp->pln_x = sx;
|
pp->pln_x = sx;
|
||||||
|
|
|
@ -122,13 +122,13 @@ msl_hit(struct plnstr *pp, int hardtarget, int type, int news_item,
|
||||||
xyas(x, y, victim));
|
xyas(x, y, victim));
|
||||||
|
|
||||||
if ((pcp->pl_flags & P_T && !(pcp->pl_flags & P_MAR))) {
|
if ((pcp->pl_flags & P_T && !(pcp->pl_flags & P_MAR))) {
|
||||||
if (msl_intercept(x, y, pp->pln_own, pcp->pl_def,
|
if (msl_intercept(x, y, pp->pln_own, pln_def(pp),
|
||||||
sublaunch, P_N, P_O)) {
|
sublaunch, P_N, P_O)) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (pcp->pl_flags & P_MAR) {
|
if (pcp->pl_flags & P_MAR) {
|
||||||
if (shp_missile_defense(x, y, pp->pln_own, pcp->pl_def)) {
|
if (shp_missile_defense(x, y, pp->pln_own, pln_def(pp))) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue