From 6c17cf9d17c1ae278136448ab005fe0703531021 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sat, 20 Aug 2016 19:24:18 +0200 Subject: [PATCH] remove move_on_land from sail() --- src/move.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/src/move.c b/src/move.c index b393777a0..fdc2dc64f 100644 --- a/src/move.c +++ b/src/move.c @@ -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);