* Known contributors to this file:
* Ken Stevens, 1995 (rewritten)
* Ron Koenderink, 2006-2007
+ * Markus Armbruster, 2006-2011
*/
#include <config.h>
if (player->argp[2]) {
strcpy(buf, player->argp[2]);
- if (!(cp = unit_path(*together, leader, buf)))
- cp = player->argp[2];
+ cp = unit_path(*together, leader, buf);
}
*pt = '\0';
stopping = 1;
continue;
}
- if (!(cp = unit_path(*together, leader, buf)))
- cp = buf;
+ if (cp)
+ cp = unit_path(*together, leader, cp);
}
if (type == EF_SHIP) {
rad_map_set(player->cnum, leader->x, leader->y, leader->effic,
return NULL;
if (!sarg_xy(buf, &destx, &desty))
- return NULL;
+ return buf;
if (!together) {
pr("Cannot go to a destination sector if not all starting in the same sector\n");
return NULL;
*/
c = path_find(unit->x, unit->y, destx, desty, sect.sct_own, mtype);
if (c < 0) {
- buf[0] = 0;
pr("No owned %s from %s to %s!\n",
mtype == MOB_RAIL ? "railway" : "path",
xyas(unit->x, unit->y, player->cnum),