Fix land unit return fire damage to ships inconsistency

Land units firing at ships have their damage reduced based on their
accuracy.  This wasn't done when returning fire in quiet_bigdef().
Fix that.
This commit is contained in:
Markus Armbruster 2008-06-08 11:06:40 +02:00
parent c75e567b9e
commit e1d7f9bf8e

View file

@ -703,6 +703,10 @@ quiet_bigdef(int type, struct emp_qelem *list, natid own, natid aown,
if (!fp) if (!fp)
add_to_flist(list, (struct empobj *)&land, dam2, 0); add_to_flist(list, (struct empobj *)&land, dam2, 0);
nreport(land.lnd_own, N_FIRE_BACK, player->cnum, 1); nreport(land.lnd_own, N_FIRE_BACK, player->cnum, 1);
if (type == EF_SHIP) {
if (chance(lnd_acc(&land) / 100.0))
dam2 = ldround(dam2 / 2.0, 1);
}
dam += dam2; dam += dam2;
} }