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
1 changed files with 9 additions and 6 deletions

View File

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