Add solidity back to MT_SALOONDOOR, to work as a backup in case MT_SALOONDOORCENTER doesn't work (which it has issues with in one location in ACZ2 for some reason, and I can't identify why).

Fully resolves #209, in any case.
This commit is contained in:
toaster 2019-10-06 12:14:18 +01:00
parent df2600cbea
commit 93ce5bb94d

View file

@ -870,21 +870,18 @@ static boolean PIT_CheckThing(mobj_t *thing)
}
}
if (thing->type == MT_SALOONDOOR)
if (thing->type == MT_SALOONDOOR && tmthing->player)
{
if (tmthing->player)
mobj_t *ref = (tmthing->player->powers[pw_carry] == CR_MINECART && tmthing->tracer && !P_MobjWasRemoved(tmthing->tracer)) ? tmthing->tracer : tmthing;
if ((thing->flags & MF2_AMBUSH) || ref != tmthing)
{
mobj_t *ref = (tmthing->player->powers[pw_carry] == CR_MINECART && tmthing->tracer && !P_MobjWasRemoved(tmthing->tracer)) ? tmthing->tracer : tmthing;
if ((thing->flags & MF2_AMBUSH) || ref != tmthing)
{
fixed_t dm = min(FixedHypot(ref->momx, ref->momy), 16*FRACUNIT);
angle_t ang = R_PointToAngle2(0, 0, ref->momx, ref->momy) - thing->angle;
fixed_t s = FINESINE((ang >> ANGLETOFINESHIFT) & FINEMASK);
S_StartSound(tmthing, thing->info->activesound);
thing->extravalue2 += 2*FixedMul(s, dm)/3;
}
fixed_t dm = min(FixedHypot(ref->momx, ref->momy), 16*FRACUNIT);
angle_t ang = R_PointToAngle2(0, 0, ref->momx, ref->momy) - thing->angle;
fixed_t s = FINESINE((ang >> ANGLETOFINESHIFT) & FINEMASK);
S_StartSound(tmthing, thing->info->activesound);
thing->extravalue2 += 2*FixedMul(s, dm)/3;
return true;
}
return true;
}
if (thing->type == MT_SALOONDOORCENTER && tmthing->player)