Don't allow tugs to take ownership of something that is already owned.
This commit is contained in:
parent
c7bdeb195c
commit
bd8e88b3ac
|
@ -721,7 +721,7 @@ static int nearTowableCraft(void)
|
||||||
|
|
||||||
for (i = 0, e = candidates[i] ; e != NULL ; e = candidates[++i])
|
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);
|
dist = getDistance(self->x, self->y, e->x, e->y);
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ void attachRope(void)
|
||||||
|
|
||||||
for (i = 0, e = candidates[i] ; e != NULL ; e = candidates[++i])
|
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);
|
distance = getDistance(e->x, e->y, self->x, self->y);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue