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 <armbru@pond.sub.org>
This commit is contained in:
Markus Armbruster 2016-06-05 15:13:11 +02:00
parent a5d90c0184
commit 3b543dac8a

View file

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