.TH Command MISSION
.NA mission "Assign a mission to a ship/plane/unit"
.LV Basic
-.SY "mission <TYPE> <UNITS> <s|o|d|i|e|r|a|c|q> [<op sector|.>] [<radius>]"
+.SY "mission <TYPE> <UNITS> <s|o|d|i|e|r|a|c|q> <op sector|.> [<radius>]"
.s1
The mission command is used to assign ships, planes, or land units to
missions. The available missions are:
.s1
OPERATIONS SECTORS
.s1
-Some missions require the designation of an 'op sector', short for operations
+Missions require the designation of an 'op sector', short for operations
sector. This is the center of an area that the mission is focused on.
The op sector may be any sector that is within the unit's range.
(Firing range for ships & land units on interdiction, reaction range
dist = mapdist(gp->x, gp->y, x, y);
radius = 999;
- if (mission == MI_INTERDICT || mission == MI_SUPPORT ||
- mission == MI_OSUPPORT || mission == MI_DSUPPORT ||
- mission == MI_RESERVE || mission == MI_ESCORT ||
- mission == MI_AIR_DEFENSE) {
+ if (mission) {
radius = oprange(gp, mission);
if (radius < dist) {
pr("%s: out of range! (range %d)\n",
num++; /* good one.. go with it */
- if (mission == MI_INTERDICT || mission == MI_SUPPORT ||
- mission == MI_OSUPPORT || mission == MI_DSUPPORT ||
- mission == MI_RESERVE || mission == MI_ESCORT ||
- mission == MI_AIR_DEFENSE)
- gp->radius = radius;
- else
- gp->radius = 0;
-
- if (mission == MI_SUPPORT || mission == MI_OSUPPORT ||
- mission == MI_DSUPPORT || mission == MI_INTERDICT ||
- mission == MI_RESERVE || mission == MI_ESCORT ||
- mission == MI_AIR_DEFENSE) {
+ if (mission) {
pr("%s on %s mission, centered on %s, radius %d\n",
obj_nameof(gp), mission_name(mission),
- xyas(x, y, player->cnum), gp->radius);
- } else if (mission) {
- pr("%s on %s mission\n", obj_nameof(gp),
- mission_name(mission));
- }
-
- if (mission)
+ xyas(x, y, player->cnum), radius);
gp->mobil -= mobused;
+ gp->radius = radius;
+ } else
+ gp->radius = 0;
+
gp->mission = mission;
gp->opx = x;
gp->opy = y;