(mission): Nicer diagnostics.
This commit is contained in:
parent
27d37f35a9
commit
8861333689
1 changed files with 6 additions and 16 deletions
|
@ -218,8 +218,8 @@ mission(void)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if ((mission && (gp->mobil < mobused)) && mission_mob_cost) {
|
if ((mission && (gp->mobil < mobused)) && mission_mob_cost) {
|
||||||
pr("%s #%d: not enough mobility! (needs %d)\n",
|
pr("%s: not enough mobility! (needs %d)\n",
|
||||||
ef_nameof(type), gp->uid, mobused);
|
nameofitem(gp, type), mobused);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (mission == MI_RESERVE && !lnd_can_attack((struct lndstr *)gp)) {
|
if (mission == MI_RESERVE && !lnd_can_attack((struct lndstr *)gp)) {
|
||||||
|
@ -240,33 +240,23 @@ mission(void)
|
||||||
mission == MI_OSUPPORT || mission == MI_DSUPPORT ||
|
mission == MI_OSUPPORT || mission == MI_DSUPPORT ||
|
||||||
mission == MI_AIR_DEFENSE) &&
|
mission == MI_AIR_DEFENSE) &&
|
||||||
(oprange(gp, type, &radius) < dist)) {
|
(oprange(gp, type, &radius) < dist)) {
|
||||||
pr("%s #%d: out of range! (range %d)\n",
|
pr("%s: out of range! (range %d)\n",
|
||||||
ef_nameof(type), gp->uid, oprange(gp, type, &radius));
|
nameofitem(gp, type), oprange(gp, type, &radius));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (radius > desired_radius)
|
if (radius > desired_radius)
|
||||||
radius = desired_radius;
|
radius = desired_radius;
|
||||||
|
|
||||||
/*
|
|
||||||
if (mission && (gp->effic < 60)){
|
|
||||||
pr("%s #%d: not efficient enough! (must be>=60%)\n",
|
|
||||||
ef_nameof(type), gp->uid);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
if ((mission == MI_INTERDICT) && (type == EF_SHIP))
|
if ((mission == MI_INTERDICT) && (type == EF_SHIP))
|
||||||
if (mchr[(int)gp->type].m_frnge < 1) {
|
if (mchr[(int)gp->type].m_frnge < 1) {
|
||||||
pr("%s #%d: cannot fire at range!\n",
|
pr("%s: cannot fire at range!\n", nameofitem(gp, type));
|
||||||
ef_nameof(type), gp->uid);
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((mission == MI_INTERDICT) && (type == EF_LAND))
|
if ((mission == MI_INTERDICT) && (type == EF_LAND))
|
||||||
if (lchr[(int)gp->type].l_frg < 1) {
|
if (lchr[(int)gp->type].l_frg < 1) {
|
||||||
pr("%s #%d: cannot fire at range!\n",
|
pr("%s: cannot fire at range!\n", nameofitem(gp, type));
|
||||||
ef_nameof(type), gp->uid);
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue