From bd8e88b3ac4f18777a69615a0c1b7d2ea340afa3 Mon Sep 17 00:00:00 2001 From: Steve Date: Mon, 28 Mar 2016 10:39:52 +0100 Subject: [PATCH] Don't allow tugs to take ownership of something that is already owned. --- src/battle/ai.c | 2 +- src/battle/rope.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/battle/ai.c b/src/battle/ai.c index 2fc03d9..145b48a 100644 --- a/src/battle/ai.c +++ b/src/battle/ai.c @@ -721,7 +721,7 @@ static int nearTowableCraft(void) for (i = 0, e = candidates[i] ; e != NULL ; e = candidates[++i]) { - if ((e->flags & (EF_DISABLED|EF_MISSION_TARGET)) == (EF_DISABLED|EF_MISSION_TARGET) && (e->flags & EF_ROPED_ATTACHED) == 0) + if (!e->owner && (e->flags & (EF_DISABLED|EF_MISSION_TARGET)) == (EF_DISABLED|EF_MISSION_TARGET) && (e->flags & EF_ROPED_ATTACHED) == 0) { dist = getDistance(self->x, self->y, e->x, e->y); diff --git a/src/battle/rope.c b/src/battle/rope.c index e4a236f..fbe9d1c 100644 --- a/src/battle/rope.c +++ b/src/battle/rope.c @@ -31,7 +31,7 @@ void attachRope(void) for (i = 0, e = candidates[i] ; e != NULL ; e = candidates[++i]) { - if ((e->flags & EF_DISABLED) && (e->flags & EF_ROPED_ATTACHED) == 0 && e->alive == ALIVE_ALIVE) + if (!e->owner && (e->flags & EF_DISABLED) && (e->flags & EF_ROPED_ATTACHED) == 0 && e->alive == ALIVE_ALIVE) { distance = getDistance(e->x, e->y, self->x, self->y);