Fix ground combat to report defending land units

Commit 092a52f2 (v4.3.4) removed the code to estimate defense, because
the use of the estimate had been disabled since v4.0.0.  This
accidentally removed the reporting of defending units, because
get_dlist() reported them when called for an estimate, and not when
called for real.

Fix by removing the unused estimate capability from get_dlist().  It
now reports defending units always.
(cherry picked from commit 64f44e9904)
This commit is contained in:
Markus Armbruster 2008-05-31 10:35:47 +02:00 committed by Markus Armbruster
parent b8bdc32b3c
commit 07d2c38a73

View file

@ -1230,11 +1230,8 @@ get_dlist(struct combat *def, struct emp_qelem *list, int a_spy,
continue; continue;
if (def->type == EF_LAND && land.lnd_land != def->lnd_uid) if (def->type == EF_LAND && land.lnd_land != def->lnd_uid)
continue; continue;
if (!list) { /* Just estimating the enemy strength */
intelligence_report(player->cnum, &land, a_spy, intelligence_report(player->cnum, &land, a_spy,
"Scouts report defending unit:"); "Scouts report defending unit:");
continue;
}
if (!(llp = malloc(sizeof(struct ulist)))) { if (!(llp = malloc(sizeof(struct ulist)))) {
logerror("Malloc failed in attack!\n"); logerror("Malloc failed in attack!\n");
abort_attack(); abort_attack();