Fix Minus causing crashes if it picks up a Snapper.

This commit is contained in:
toaster 2019-10-06 16:04:19 +01:00
parent aec5f26819
commit 8b1a20f415
2 changed files with 3 additions and 3 deletions

View file

@ -5359,7 +5359,6 @@ static boolean PIT_MinusCarry(mobj_t *thing)
return true;
P_SetTarget(&minus->tracer, thing);
P_SetTarget(&thing->tracer, minus);
if (thing->flags & MF_PUSHABLE)
{
minus->flags2 |= MF2_STRONGBOX;
@ -5428,6 +5427,9 @@ void A_MinusDigging(mobj_t *actor)
A_Chase(actor);
// Carry over shit, maybe
if (P_MobjWasRemoved(actor->tracer) || !actor->tracer->health)
P_SetTarget(&actor->tracer, NULL);
if (!actor->tracer)
{
fixed_t radius = 3*actor->radius;
@ -5456,7 +5458,6 @@ void A_MinusDigging(mobj_t *actor)
actor->flags2 &= ~MF2_STRONGBOX;
actor->tracer->flags |= MF_PUSHABLE;
}
P_SetTarget(&actor->tracer->tracer, NULL);
P_SetTarget(&actor->tracer, NULL);
}
}

View file

@ -2689,7 +2689,6 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, UINT8 damaget
target->flags2 &= ~MF2_STRONGBOX;
target->tracer->flags |= MF_PUSHABLE;
}
P_SetTarget(&target->tracer->tracer, NULL);
P_SetTarget(&target->tracer, NULL);
}
break;