From 3b543dac8a7e8194fd2b847d889672c82ed043dc Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sun, 5 Jun 2016 15:13:11 +0200 Subject: [PATCH] update/ship: Don't let stopped sectors repair foreign ships 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 --- src/lib/update/ship.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/update/ship.c b/src/lib/update/ship.c index 132d0161..27ee0e8f 100644 --- a/src/lib/update/ship.c +++ b/src/lib/update/ship.c @@ -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