Drop redundant nav_loadship() parameter cnum
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 30 Jan 2011 15:55:15 +0000 (16:55 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 13 Feb 2011 15:03:34 +0000 (16:03 +0100)
src/lib/update/nav_ship.c

index b3e80b02615afcbffe3e2646811a8556b25a1625..b4f5081550aaf38f60e283e559bca344e2614fdc 100644 (file)
@@ -142,7 +142,7 @@ swap(struct shpstr *sp)
  */
 
 static int
-nav_loadship(struct shpstr *sp, natid cnum)
+nav_loadship(struct shpstr *sp)
 {
     struct sctstr *sectp;
     int i, landown, shipown, didsomething[TMAX], rel;
@@ -162,7 +162,7 @@ nav_loadship(struct shpstr *sp, natid cnum)
 
     landown = sectp->sct_own;
     shipown = sp->shp_own;
-    rel = getrel(getnatp(sectp->sct_own), cnum);
+    rel = getrel(getnatp(sectp->sct_own), sp->shp_own);
 
     /* loop through each field for that ship */
     for (i = 0; i < TMAX; ++i) {
@@ -313,7 +313,7 @@ nav_ship(struct shpstr *sp)
 
        /* Try to load the ship */
        if (sp->shp_autonav & AN_LOADING) {
-           didsomething = nav_loadship(sp, sp->shp_own);
+           didsomething = nav_loadship(sp);
            if (didsomething)
                quit = 1;
        }