(plane_bomb, land_bomb): Apply collateral damage to target sector

instead of where the targeted plane/land unit is after the attack.
Different if the target retreats.  Can't happen for planes.  Reported
by Greg German.
This commit is contained in:
Markus Armbruster 2005-11-29 17:54:45 +00:00
parent f5c81fe39e
commit 2517931b12

View file

@ -714,7 +714,7 @@ plane_bomb(struct emp_qelem *list, struct sctstr *target)
cname(player->cnum), dam, prplane(&plane), cname(player->cnum), dam, prplane(&plane),
xyas(target->sct_x, target->sct_y, own)); xyas(target->sct_x, target->sct_y, own));
putplane(plane.pln_uid, &plane); putplane(plane.pln_uid, &plane);
collateral_damage(plane.pln_x, plane.pln_y, dam, list); collateral_damage(target->sct_x, target->sct_y, dam, list);
next: next:
; ;
} }
@ -821,7 +821,7 @@ land_bomb(struct emp_qelem *list, struct sctstr *target)
retreat_land(&land, 'b'); retreat_land(&land, 'b');
nreport(player->cnum, N_UNIT_BOMB, own, 1); nreport(player->cnum, N_UNIT_BOMB, own, 1);
putland(land.lnd_uid, &land); putland(land.lnd_uid, &land);
collateral_damage(land.lnd_x, land.lnd_y, dam, list); collateral_damage(target->sct_x, target->sct_y, dam, list);
next: next:
; ;
} }