]> git.pond.sub.org Git - empserver/blobdiff - src/lib/update/nav_ship.c
Refactor and fix scuttle and scrap code
[empserver] / src / lib / update / nav_ship.c
index f49c2643e9fb6699e7d6feb687a2e99ffa859c54..f34b56709cfc875c0060cb9eb06083077ca1ccd8 100644 (file)
@@ -66,7 +66,10 @@ scuttle_it(struct shpstr *sp)
     }
     wu(0, sp->shp_own, "Scuttling %s in sector %s\n",
        prship(sp), xyas(sp->shp_x, sp->shp_y, sp->shp_own));
-    scuttle_ship(sp);
+    if (sectp->sct_own == sp->shp_own)
+       unit_drop_cargo((struct empobj *)sp, sectp->sct_own);
+    sp->shp_effic = 0;
+    putship(sp->shp_uid, sp);
 }
 
 static void