Remove rope flags when rope is detached.
This commit is contained in:
parent
c9bde77bca
commit
7789d3ab64
|
@ -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->alive == ALIVE_ALIVE)
|
if ((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);
|
||||||
|
|
||||||
|
@ -43,6 +43,7 @@ void attachRope(void)
|
||||||
self->aiFlags |= AIF_GOAL_JUMPGATE;
|
self->aiFlags |= AIF_GOAL_JUMPGATE;
|
||||||
|
|
||||||
e->flags |= EF_RETREATING;
|
e->flags |= EF_RETREATING;
|
||||||
|
e->flags |= EF_ROPED_ATTACHED;
|
||||||
|
|
||||||
runScriptFunction("TOWING %s", e->name);
|
runScriptFunction("TOWING %s", e->name);
|
||||||
|
|
||||||
|
@ -97,6 +98,9 @@ void cutRope(Entity *e)
|
||||||
{
|
{
|
||||||
if (e->owner && e->owner->towing == e)
|
if (e->owner && e->owner->towing == e)
|
||||||
{
|
{
|
||||||
|
e->flags &= ~EF_RETREATING;
|
||||||
|
e->flags &= ~EF_ROPED_ATTACHED;
|
||||||
|
|
||||||
e->owner->towing = NULL;
|
e->owner->towing = NULL;
|
||||||
e->owner->aiFlags &= ~AIF_GOAL_JUMPGATE;
|
e->owner->aiFlags &= ~AIF_GOAL_JUMPGATE;
|
||||||
e->owner = NULL;
|
e->owner = NULL;
|
||||||
|
|
Loading…
Reference in New Issue