From 11ce99dfc73d092162f1a6dc09e270dbc5b48d6e Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sun, 13 Feb 2022 16:24:01 +0200 Subject: [PATCH 37/37] AI: Alight unit when amphibious transport reaches destination See osdn #43639 Signed-off-by: Marko Lindqvist --- ai/default/aiferry.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ai/default/aiferry.c b/ai/default/aiferry.c index 2a92d9cf65..ed8dfc46d0 100644 --- a/ai/default/aiferry.c +++ b/ai/default/aiferry.c @@ -708,8 +708,11 @@ bool dai_amphibious_goto_constrained(struct ai_type *ait, } } /* else at sea */ + } else if (alive) { + /* Arrived all the way to the destination by boat. Alight. */ + unit_transport_unload_send(passenger); } - /* else dead or arrived */ + /* else dead */ } else { /* Not always an error; enemy units might block all paths. */ UNIT_LOG(LOG_DEBUG, passenger, "no path to destination"); -- 2.34.1