remove move_on_land from sail()

This commit is contained in:
Enno Rehling 2016-08-20 19:24:18 +02:00
parent 860078cfc9
commit 6c17cf9d17
1 changed files with 7 additions and 12 deletions

View File

@ -1786,8 +1786,7 @@ bool can_takeoff(const ship * sh, const region * from, const region * to)
return true;
}
static void
sail(unit * u, order * ord, bool move_on_land, region_list ** routep)
static void sail(unit * u, order * ord, region_list ** routep)
{
region *starting_point = u->region;
region *current_point, *last_point;
@ -1909,12 +1908,10 @@ sail(unit * u, order * ord, bool move_on_land, region_list ** routep)
} // storms_enabled
if (!fval(tthis, SEA_REGION)) {
if (!fval(tnext, SEA_REGION)) {
if (!move_on_land) {
/* check that you're not traveling from one land region to another. */
ADDMSG(&u->faction->msgs, msg_message("shipnoshore",
"ship region", sh, next_point));
break;
}
/* check that you're not traveling from one land region to another. */
ADDMSG(&u->faction->msgs, msg_message("shipnoshore",
"ship region", sh, next_point));
break;
}
else {
if (!can_takeoff(sh, current_point, next_point)) {
@ -2024,9 +2021,7 @@ sail(unit * u, order * ord, bool move_on_land, region_list ** routep)
* transferiert wurden, kann der aktuelle Befehl gelöscht werden. */
cycle_route(ord, u, step);
set_order(&u->thisorder, NULL);
if (!move_on_land) {
set_coast(sh, last_point, current_point);
}
set_coast(sh, last_point, current_point);
if (is_cursed(sh->attribs, C_SHIP_FLYING, 0)) {
ADDMSG(&f->msgs, msg_message("shipfly", "ship from to", sh,
@ -2279,7 +2274,7 @@ void move_cmd(unit * u, order * ord, bool move_on_land)
assert(u->number);
if (u->ship && u == ship_owner(u->ship)) {
sail(u, ord, move_on_land, &route);
sail(u, ord, &route);
}
else {
travel(u, &route);