forked from github/server
- flasche Küste für abgedriftete Schiffe\nhttp://eressea.upb.de/mantis/bug_view_page.php?bug_id=0000124
This commit is contained in:
parent
21f4fed2c2
commit
91332068ce
|
@ -1298,6 +1298,7 @@ economics(void)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
if (u->orders==NULL) break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* RECRUIT orders */
|
/* RECRUIT orders */
|
||||||
|
|
|
@ -586,6 +586,14 @@ ship_allowed(const struct ship_type * type, const region * r)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static boolean
|
||||||
|
flying_ship(const ship * sh)
|
||||||
|
{
|
||||||
|
if (sh->type->flags & SFL_FLY) return true;
|
||||||
|
if (is_cursed(sh->attribs, C_SHIP_FLYING, 0)) return true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
drifting_ships(region * r)
|
drifting_ships(region * r)
|
||||||
{
|
{
|
||||||
|
@ -649,9 +657,11 @@ drifting_ships(region * r)
|
||||||
if (sh!=NULL) {
|
if (sh!=NULL) {
|
||||||
fset(sh, SF_DRIFTED);
|
fset(sh, SF_DRIFTED);
|
||||||
|
|
||||||
if (rterrain(rnext) != T_OCEAN) {
|
if (rnext->terrain != T_OCEAN && !flying_ship(sh)) {
|
||||||
sh->coast = dir_invert(d);
|
sh->coast = reldirection(rnext, r);
|
||||||
}
|
} else {
|
||||||
|
sh->coast = NODIRECTION;
|
||||||
|
}
|
||||||
damage_ship(sh, 0.02);
|
damage_ship(sh, 0.02);
|
||||||
|
|
||||||
if (sh->damage>=sh->size * DAMAGE_SCALE) {
|
if (sh->damage>=sh->size * DAMAGE_SCALE) {
|
||||||
|
@ -1386,14 +1396,6 @@ check_takeoff(ship *sh, region *from, region *to)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static boolean
|
|
||||||
flying_ship(const ship * sh)
|
|
||||||
{
|
|
||||||
if (sh->type->flags & SFL_FLY) return true;
|
|
||||||
if (is_cursed(sh->attribs, C_SHIP_FLYING, 0)) return true;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
static region_list *
|
static region_list *
|
||||||
sail(unit * u, region * next_point, boolean move_on_land)
|
sail(unit * u, region * next_point, boolean move_on_land)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue