From 2b17656efe92c142e5c6f53216d9b85c4038969c Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Fri, 10 Jun 2016 20:45:23 +0200 Subject: [PATCH] custom message for insects that cannot enter a region. --- src/move.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/move.c b/src/move.c index 34490b9f6..671b6aa20 100644 --- a/src/move.c +++ b/src/move.c @@ -677,12 +677,6 @@ int check_ship_allowed(struct ship *sh, const region * r) } if (is_freezing(u)) { - unit *captain = ship_owner(sh); - if (captain) { - ADDMSG(&captain->faction->msgs, - msg_message("detectforbidden", "unit region", u, r)); - } - return SA_NO_INSECT; } } @@ -1952,7 +1946,10 @@ sail(unit * u, order * ord, bool move_on_land, region_list ** routep) reason = check_ship_allowed(sh, next_point); if (reason < 0) { /* for some reason or another, we aren't allowed in there.. */ - if (check_leuchtturm(current_point, NULL) || reason == SA_NO_INSECT) { + if (reason == SA_NO_INSECT) { + ADDMSG(&f->msgs, msg_message("detectforbidden", "unit region", u, sh->region)); + } + else if (check_leuchtturm(current_point, NULL)) { ADDMSG(&f->msgs, msg_message("sailnolandingstorm", "ship region", sh, next_point)); } else {