Merge branch 'we-do-a-little-trolling' into 'next'

Take ramp sectors into account for pushables (closes #595)

Closes #595

See merge request STJr/SRB2!1540
This commit is contained in:
sphere 2021-12-20 12:34:26 +00:00
commit 4b9d40b911

View file

@ -2715,6 +2715,16 @@ boolean P_TryMove(mobj_t *thing, fixed_t x, fixed_t y, boolean allowdropoff)
&& P_MobjFlip(thing)*thing->momz > FixedMul(FRACUNIT, thing->scale))
maxstep = 0;
}
else if (thing->flags & MF_PUSHABLE)
{
// If using type Section1:13, double the maxstep.
if (GETSECSPECIAL(R_PointInSubsector(x, y)->sector->special, 1) == 13)
maxstep <<= 1;
// If using type Section1:14, no maxstep.
if (GETSECSPECIAL(R_PointInSubsector(x, y)->sector->special, 1) == 14)
maxstep = 0;
}
if (thing->type == MT_SKIM)
maxstep = 0;