Don't allow tugs to take ownership of something that is already owned.

This commit is contained in:
Steve 2016-03-28 10:39:52 +01:00
parent c7bdeb195c
commit bd8e88b3ac
2 changed files with 2 additions and 2 deletions

View File

@ -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);

View File

@ -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);