(dist): Simplify.

This commit is contained in:
Markus Armbruster 2006-04-30 08:34:05 +00:00
parent db407ec065
commit 37b18621bc

View file

@ -53,7 +53,7 @@ dist(void)
{
struct sctstr sect, dsect, tsect;
struct nstr_sect nstr;
char *path, *p;
char *p;
double move_cost = 0.0;
coord dstx, dsty;
char buf[1024];
@ -100,9 +100,7 @@ dist(void)
pr("Warning: you don't own %s!\n",
xyas(dsect.sct_x, dsect.sct_y, player->cnum));
path = BestDistPath(buf, &sect, &dsect, &move_cost, MOB_ROAD);
if (!path) {
if (!BestDistPath(buf, &sect, &dsect, &move_cost, MOB_ROAD)) {
pr("No owned path from %s to %s.\n",
xyas(dsect.sct_x, dsect.sct_y, player->cnum),
xyas(sect.sct_x, sect.sct_y, player->cnum));