/*
* Empire - A multi-player, client/server Internet based war game.
- * Copyright (C) 1986-2013, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ * Copyright (C) 1986-2021, Dave Pare, Jeff Bailey, Thomas Ruschak,
* Ken Stevens, Steve McClure, Markus Armbruster
*
* Empire is free software: you can redistribute it and/or modify
* Known contributors to this file:
* Thomas Ruschak, 1992
* Steve McClure, 2000
- * Markus Armbruster, 2005-2010
+ * Markus Armbruster, 2005-2021
*/
#include <config.h>
radius = 9999;
while (nxtitem(&ni, &item)) {
- gp = (struct empobj *)&item;
+ gp = &item.gen;
if (!player->owner || gp->own == 0)
continue;
pcp = &plchr[(int)gp->type];
if (!(pcp->pl_flags & P_F)) {
- pr("Only planes with the intercept abilities can perform air defense.\n"
+ pr("Only planes with the intercept ability can perform air defense.\n"
"%s #%d is ineligible\n",
pcp->pl_name, gp->uid);
continue;
struct plchrstr *pcp;
pcp = &plchr[(int)gp->type];
+ if (pcp->pl_flags & P_M) {
+ pr("Missiles can't escort.\n"
+ "%s #%d is ineligible\n",
+ pcp->pl_name, gp->uid);
+ continue;
+ }
if (!(pcp->pl_flags & P_ESC) && !(pcp->pl_flags & P_F)) {
pr("Only planes with the escort or intercept abilities can escort.\n"
"%s #%d is ineligible\n",
}
if (type == EF_PLANE && nuk_on_plane((struct plnstr *)gp) >= 0) {
- pr("%s can't perform a mission while it carries a nuclear weapon",
+ pr("%s can't perform a mission"
+ " while it is carrying a nuclear weapon\n",
unit_nameof(gp));
continue;
}
struct empobj *gp;
while (nxtitem(np, &item)) {
- gp = (struct empobj *)&item;
+ gp = &item.gen;
if (!player->owner || gp->own == 0)
continue;
if (first) {
- pr("Thing x,y op-sect rad mission\n");
+ pr("Thing x,y op-sect rad mission\n");
first = 0;
}
pr("%-25s", unit_nameof(gp));
- prxy(" %3d,%-3d", gp->x, gp->y);
+ prxy(" %4d,%-4d", gp->x, gp->y);
switch (gp->mission) {
case MI_INTERDICT:
case MI_SUPPORT:
case MI_AIR_DEFENSE:
case MI_DSUPPORT:
case MI_OSUPPORT:
- prxy(" %3d,%-3d", gp->opx, gp->opy);
- pr(" %4d", gp->radius);
+ prxy(" %4d,%-4d", gp->opx, gp->opy);
+ pr(" %3d", gp->radius);
break;
default:
CANT_REACH();