(qorde): Output messed up for ships with sail path. Fix and
simplify. Remove inappropriate ship sanity check, should be done elsewhere, and differently.
This commit is contained in:
parent
591c82bf7c
commit
4c37776458
1 changed files with 18 additions and 26 deletions
|
@ -373,27 +373,23 @@ qorde(void)
|
|||
while (nxtitem(&nb, (&ship))) {
|
||||
if (!player->owner || ship.shp_own == 0)
|
||||
continue;
|
||||
if (ship.shp_type < 0 || ship.shp_type > shp_maxno) {
|
||||
pr("bad ship type %d (#%d)\n", ship.shp_type, nb.cur);
|
||||
if (!(ship.shp_autonav & AN_AUTONAV)
|
||||
&& (!opt_SAIL || !ship.shp_path[0]))
|
||||
continue;
|
||||
}
|
||||
|
||||
if ((ship.shp_autonav & AN_AUTONAV) ||
|
||||
(ship.shp_path[0] && opt_SAIL)) {
|
||||
if (!nships) { /* 1st ship, print banner */
|
||||
if (player->god)
|
||||
pr("own ");
|
||||
pr("shp# ship type ");
|
||||
pr("[Starting] (Ending) \n");
|
||||
}
|
||||
nships++;
|
||||
if (!nships) { /* 1st ship, print banner */
|
||||
if (player->god)
|
||||
pr("%3d ", ship.shp_own);
|
||||
pr("%4d", nb.cur);
|
||||
pr(" %-16.16s", mchr[(int)ship.shp_type].m_name);
|
||||
pr("own ");
|
||||
pr("shp# ship type ");
|
||||
pr("[Starting] (Ending) \n");
|
||||
}
|
||||
if (ship.shp_autonav & AN_AUTONAV) {
|
||||
nships++;
|
||||
if (player->god)
|
||||
pr("%3d ", ship.shp_own);
|
||||
pr("%4d", nb.cur);
|
||||
pr(" %-16.16s", mchr[(int)ship.shp_type].m_name);
|
||||
|
||||
if (ship.shp_autonav & AN_AUTONAV) {
|
||||
pr(" [");
|
||||
for (i = 0; i < TMAX; i++)
|
||||
prhold(i, ship.shp_tend[i], ship.shp_lend[i]);
|
||||
|
@ -404,17 +400,13 @@ qorde(void)
|
|||
if (ship.shp_autonav & AN_SCUTTLE)
|
||||
pr(" scuttling");
|
||||
pr("\n");
|
||||
}
|
||||
} else
|
||||
pr("has a sail path\n");
|
||||
|
||||
if (opt_SHIPNAMES) {
|
||||
if ((ship.shp_autonav & AN_AUTONAV) ||
|
||||
(ship.shp_path[0] && opt_SAIL)) {
|
||||
if (ship.shp_name[0] != 0) {
|
||||
if (player->god)
|
||||
pr(" ");
|
||||
pr(" %s\n", ship.shp_name);
|
||||
}
|
||||
}
|
||||
if (opt_SHIPNAMES && ship.shp_name[0] != 0) {
|
||||
if (player->god)
|
||||
pr(" ");
|
||||
pr(" %s\n", ship.shp_name);
|
||||
}
|
||||
}
|
||||
if (!nships) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue