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:
parent
a5d90c0184
commit
3b543dac8a
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue