From 4b1b5780215233ef09a712482d33aed4d406a84e Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Wed, 14 Feb 2007 18:46:19 +0000 Subject: [PATCH] FOLGE SCHIFF benutt jetzt immer den letzten gefundenen trail des Schiffes in der Region. --- src/common/kernel/movement.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/common/kernel/movement.c b/src/common/kernel/movement.c index 4d980c444..d8ea72696 100644 --- a/src/common/kernel/movement.c +++ b/src/common/kernel/movement.c @@ -2246,14 +2246,18 @@ static direction_t hunted_dir(attrib *at, int id) { attrib *a = a_find(at, &at_shiptrail); + direction_t d = NODIRECTION; while (a!=NULL && a->type==&at_shiptrail) { traveldir *t = (traveldir *)(a->data.v); - if (t->no == id) return t->dir; + if (t->no == id) { + d = t->dir; + /* do not break, because we want the last one for this ship */ + } a = a->next; } - return NODIRECTION; + return d; } static int