forked from github/server
do not damage ships with no owner while still in production
This commit is contained in:
parent
bf5bccc133
commit
db8f2f7d0c
|
@ -2659,6 +2659,8 @@ sinkships(region * r)
|
||||||
|
|
||||||
while (*shp) {
|
while (*shp) {
|
||||||
ship * sh = *shp;
|
ship * sh = *shp;
|
||||||
|
|
||||||
|
if (!sh->type->construction || sh->size>=sh->type->construction->maxsize) {
|
||||||
if (fval(r->terrain, SEA_REGION) && (!enoughsailors(sh, r) || get_captain(sh)==NULL)) {
|
if (fval(r->terrain, SEA_REGION) && (!enoughsailors(sh, r) || get_captain(sh)==NULL)) {
|
||||||
/* Schiff nicht seetüchtig */
|
/* Schiff nicht seetüchtig */
|
||||||
damage_ship(sh, 0.30);
|
damage_ship(sh, 0.30);
|
||||||
|
@ -2666,6 +2668,7 @@ sinkships(region * r)
|
||||||
if (shipowner(sh)==NULL) {
|
if (shipowner(sh)==NULL) {
|
||||||
damage_ship(sh, 0.05);
|
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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue