diff --git a/info/mission.t b/info/mission.t index f299f442..732fe606 100644 --- a/info/mission.t +++ b/info/mission.t @@ -1,7 +1,7 @@ .TH Command MISSION .NA mission "Assign a mission to a ship/plane/unit" .LV Basic -.SY "mission [] []" +.SY "mission []" .s1 The mission command is used to assign ships, planes, or land units to missions. The available missions are: @@ -63,7 +63,7 @@ on a sector until 100 damage is done. .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 diff --git a/src/lib/commands/miss.c b/src/lib/commands/miss.c index d2c7e7a2..40a667e9 100644 --- a/src/lib/commands/miss.c +++ b/src/lib/commands/miss.c @@ -205,10 +205,7 @@ mission(void) 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", @@ -283,28 +280,15 @@ mission(void) 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;