]> git.pond.sub.org Git - empserver/commitdiff
update/ship: Don't let stopped sectors repair foreign ships
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 5 Jun 2016 13:13:11 +0000 (15:13 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 6 Aug 2017 17:59:58 +0000 (19:59 +0200)
Stopping a sector disables repairs of own ships completely.  Foreign
ships, however, repair just fine, consuming the sector's materials
and, if it's a harbor, its available work.

Disable repair of all ships in stopped sectors.  This is consistent
with plane and land unit repair.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
src/lib/update/ship.c

index 132d0161a90190f579954683abd5d9eb3796e1e7..27ee0e8fd9d52e1d79f8e1c05154e186202b35e3 100644 (file)
@@ -253,7 +253,7 @@ shiprepair(struct shpstr *ship, struct natstr *np, struct bp *bp, int etus)
        return;
 
     sp = getsectp(ship->shp_x, ship->shp_y);
-    if ((sp->sct_off) && (sp->sct_own == ship->shp_own))
+    if (sp->sct_off)
        return;
 
     if (sp->sct_own != 0