do not damage ships with no owner while still in production

This commit is contained in:
Enno Rehling 2010-09-02 23:25:25 -07:00
parent bf5bccc133
commit db8f2f7d0c

View file

@ -2659,12 +2659,15 @@ sinkships(region * r)
while (*shp) { while (*shp) {
ship * sh = *shp; ship * sh = *shp;
if (fval(r->terrain, SEA_REGION) && (!enoughsailors(sh, r) || get_captain(sh)==NULL)) {
/* Schiff nicht seetüchtig */ if (!sh->type->construction || sh->size>=sh->type->construction->maxsize) {
damage_ship(sh, 0.30); if (fval(r->terrain, SEA_REGION) && (!enoughsailors(sh, r) || get_captain(sh)==NULL)) {
} /* Schiff nicht seetüchtig */
if (shipowner(sh)==NULL) { damage_ship(sh, 0.30);
damage_ship(sh, 0.05); }
if (shipowner(sh)==NULL) {
damage_ship(sh, 0.05);
}
} }
if (sh->damage >= sh->size * DAMAGE_SCALE) { if (sh->damage >= sh->size * DAMAGE_SCALE) {
remove_ship(shp, sh); remove_ship(shp, sh);