Make land units on reserve mission react within op-area

Before, they always reacted to their maximum range, and the op-area
was unused.  Change mission() to define the op-area for reserve
missions as well.  Remove the special-case for showing reserve
missions from mission() and show_mission().  New lnd_reaction_range()
factored out of att_reacting_units().  Use it in oprange() to cover
reserve missions.  Pass the mission as separate parameter to oprange()
for now, because miss() doesn't set it in the object until later.
This commit is contained in:
Markus Armbruster 2008-11-22 14:40:37 -05:00
parent 40d8357746
commit 8e527b6cff
7 changed files with 40 additions and 52 deletions

View file

@ -124,6 +124,17 @@ defense_val(struct lndstr *lp)
return value;
}
int
lnd_reaction_range(struct lndstr *lp)
{
struct sctstr sect;
getsect(lp->lnd_x, lp->lnd_y, &sect);
if (sect.sct_type == SCT_HEADQ && sect.sct_effic >= 60)
return lp->lnd_rad_max + 1;
return lp->lnd_rad_max;
}
void
lnd_print(struct ulist *llp, char *s)
{