(sorde): Output messed up for ships with sail path. Fix and
simplify. Remove inappropriate ship sanity check, should be done elsewhere, and differently. (qorde): Fix the previous rev.
This commit is contained in:
parent
4c37776458
commit
df8845199e
1 changed files with 23 additions and 34 deletions
|
@ -401,7 +401,7 @@ qorde(void)
|
||||||
pr(" scuttling");
|
pr(" scuttling");
|
||||||
pr("\n");
|
pr("\n");
|
||||||
} else
|
} else
|
||||||
pr("has a sail path\n");
|
pr(" has a sail path\n");
|
||||||
|
|
||||||
if (opt_SHIPNAMES && ship.shp_name[0] != 0) {
|
if (opt_SHIPNAMES && ship.shp_name[0] != 0) {
|
||||||
if (player->god)
|
if (player->god)
|
||||||
|
@ -420,10 +420,6 @@ qorde(void)
|
||||||
return RET_OK;
|
return RET_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Chad Zabel 1-15-94
|
|
||||||
* New command added to display autonav stats.
|
|
||||||
*/
|
|
||||||
|
|
||||||
int
|
int
|
||||||
sorde(void)
|
sorde(void)
|
||||||
{
|
{
|
||||||
|
@ -439,12 +435,10 @@ sorde(void)
|
||||||
while (nxtitem(&nb, (&ship))) {
|
while (nxtitem(&nb, (&ship))) {
|
||||||
if (!player->owner || ship.shp_own == 0)
|
if (!player->owner || ship.shp_own == 0)
|
||||||
continue;
|
continue;
|
||||||
if (ship.shp_type < 0 || ship.shp_type > shp_maxno) {
|
if (!(ship.shp_autonav & AN_AUTONAV)
|
||||||
pr("bad ship type %d (#%d)\n", ship.shp_type, nb.cur);
|
&& (!opt_SAIL || !ship.shp_path[0]))
|
||||||
continue;
|
continue;
|
||||||
}
|
|
||||||
if ((ship.shp_autonav & AN_AUTONAV) ||
|
|
||||||
(ship.shp_path[0] && opt_SAIL)) {
|
|
||||||
if (!nships) { /* 1st ship, print banner */
|
if (!nships) { /* 1st ship, print banner */
|
||||||
if (player->god)
|
if (player->god)
|
||||||
pr("own ");
|
pr("own ");
|
||||||
|
@ -458,7 +452,7 @@ sorde(void)
|
||||||
pr("%4d", nb.cur);
|
pr("%4d", nb.cur);
|
||||||
pr(" %-16.16s", mchr[(int)ship.shp_type].m_name);
|
pr(" %-16.16s", mchr[(int)ship.shp_type].m_name);
|
||||||
prxy(" %3d,%-3d", ship.shp_x, ship.shp_y, player->cnum);
|
prxy(" %3d,%-3d", ship.shp_x, ship.shp_y, player->cnum);
|
||||||
}
|
|
||||||
if (ship.shp_autonav & AN_AUTONAV) {
|
if (ship.shp_autonav & AN_AUTONAV) {
|
||||||
/* Destination 1 */
|
/* Destination 1 */
|
||||||
prxy(" %3d,%-3d", ship.shp_destx[1],
|
prxy(" %3d,%-3d", ship.shp_destx[1],
|
||||||
|
@ -497,20 +491,15 @@ sorde(void)
|
||||||
if (ship.shp_autonav & AN_SCUTTLE)
|
if (ship.shp_autonav & AN_SCUTTLE)
|
||||||
pr(" (scuttling)");
|
pr(" (scuttling)");
|
||||||
pr("\n");
|
pr("\n");
|
||||||
}
|
} else
|
||||||
if (opt_SHIPNAMES) {
|
pr(" has a sail path\n");
|
||||||
if ((ship.shp_autonav & AN_AUTONAV) ||
|
|
||||||
(ship.shp_path[0] && opt_SAIL)) {
|
if (opt_SHIPNAMES && ship.shp_name[0] != 0) {
|
||||||
if (!(ship.shp_autonav & AN_AUTONAV))
|
|
||||||
pr("\n");
|
|
||||||
if (ship.shp_name[0] != 0) {
|
|
||||||
if (player->god)
|
if (player->god)
|
||||||
pr(" ");
|
pr(" ");
|
||||||
pr(" %s\n", ship.shp_name);
|
pr(" %s\n", ship.shp_name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!nships) {
|
if (!nships) {
|
||||||
if (player->argp[1])
|
if (player->argp[1])
|
||||||
pr("%s: No ship(s)\n", player->argp[1]);
|
pr("%s: No ship(s)\n", player->argp[1]);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue