Replace getvec() by direct, read-only item access in some cases where

that's obviously correct.
This commit is contained in:
Markus Armbruster 2004-03-05 10:38:58 +00:00
parent 99bfa19a92
commit b1461faea5
23 changed files with 164 additions and 222 deletions

View file

@ -211,7 +211,6 @@ sail_nav_fleet(struct fltheadstr *fltp)
{
struct fltelemstr *fe;
struct shpstr *sp, ship;
int vec[I_MAX + 1];
struct sctstr *sectp;
int error = 0;
s_char *s, *p;
@ -253,8 +252,7 @@ sail_nav_fleet(struct fltheadstr *fltp)
}
for (fe = fltp->head; fe; fe = fe->next) {
sp = getshipp(fe->num);
getvec(VT_ITEM, vec, (s_char *)sp, EF_SHIP);
if (vec[I_MILIT] == 0 && vec[I_CIVIL] == 0) {
if (sp->shp_item[I_MILIT] == 0 && sp->shp_item[I_CIVIL] == 0) {
wu(0, fltp->own,
" ship #%d (%s) is crewless and can't go on\n",
fe->num, cname(fe->own));