forked from github/server
remove move_on_land from sail()
This commit is contained in:
parent
860078cfc9
commit
6c17cf9d17
|
@ -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,13 +1908,11 @@ 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;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (!can_takeoff(sh, current_point, next_point)) {
|
||||
/* Schiff kann nicht ablegen */
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
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);
|
||||
|
|
Loading…
Reference in New Issue