Check capabilities required for mission before range
Checking range first could complain about range when the mission couldn't work regardless of range. Not helpful.
This commit is contained in:
parent
820faedb99
commit
ca9af92523
1 changed files with 14 additions and 14 deletions
|
@ -188,20 +188,6 @@ mission(void)
|
|||
obj_nameof(gp));
|
||||
continue;
|
||||
}
|
||||
if (*p == '.') {
|
||||
x = gp->x;
|
||||
y = gp->y;
|
||||
}
|
||||
|
||||
radius = oprange(gp, mission);
|
||||
if (radius < mapdist(gp->x, gp->y, x, y)) {
|
||||
pr("%s: out of range! (range %d)\n",
|
||||
obj_nameof(gp), radius);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (radius > desired_radius)
|
||||
radius = desired_radius;
|
||||
|
||||
if ((mission == MI_INTERDICT) && (type == EF_SHIP))
|
||||
if (mchr[(int)gp->type].m_glim == 0) {
|
||||
|
@ -264,6 +250,20 @@ mission(void)
|
|||
}
|
||||
}
|
||||
|
||||
if (*p == '.') {
|
||||
x = gp->x;
|
||||
y = gp->y;
|
||||
}
|
||||
|
||||
radius = oprange(gp, mission);
|
||||
if (radius < mapdist(gp->x, gp->y, x, y)) {
|
||||
pr("%s: out of range! (range %d)\n",
|
||||
obj_nameof(gp), radius);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (radius > desired_radius)
|
||||
radius = desired_radius;
|
||||
num++; /* good one.. go with it */
|
||||
|
||||
pr("%s on %s mission, centered on %s, radius %d\n",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue