diff --git a/prboom2/src/p_map.c b/prboom2/src/p_map.c index 0b241dc2e..4a28f3427 100644 --- a/prboom2/src/p_map.c +++ b/prboom2/src/p_map.c @@ -1021,7 +1021,10 @@ dboolean P_TryMove(mobj_t* thing,fixed_t x,fixed_t y, */ if (!(thing->flags & (MF_DROPOFF|MF_FLOAT))) { - if (comp[comp_dropoff] || comp[comp_ledgeblock]) + dboolean ledgeblock = comp[comp_ledgeblock] && + !(mbf21 && thing->intflags & MIF_SCROLLING); + + if (comp[comp_dropoff] || ledgeblock) { // e6y // Fix demosync bug in mbf compatibility mode @@ -1033,7 +1036,7 @@ dboolean P_TryMove(mobj_t* thing,fixed_t x,fixed_t y, // http://www.doomworld.com/idgames/index.php?id=11138 if ( ( - comp[comp_ledgeblock] || + ledgeblock || !dropoff || ( !prboom_comp[PC_NO_DROPOFF].state && diff --git a/prboom2/src/p_mobj.c b/prboom2/src/p_mobj.c index f116dcf8e..ff07aa064 100644 --- a/prboom2/src/p_mobj.c +++ b/prboom2/src/p_mobj.c @@ -993,6 +993,7 @@ void P_MobjThinker (mobj_t* mobj) if (mobj->momx | mobj->momy || mobj->flags & MF_SKULLFLY) { P_XYMovement(mobj); + mobj->intflags &= ~MIF_SCROLLING; if (mobj->thinker.function != P_MobjThinker) // cph - Must've been removed return; // killough - mobj was removed } diff --git a/prboom2/src/p_mobj.h b/prboom2/src/p_mobj.h index de3df8435..b52ac551f 100644 --- a/prboom2/src/p_mobj.h +++ b/prboom2/src/p_mobj.h @@ -238,6 +238,7 @@ enum { MIF_FALLING = 1, // Object is falling MIF_ARMED = 2, // Object is armed (for MF_TOUCHY objects) + MIF_SCROLLING = 4, // Object is affected by scroller / pusher / puller }; // heretic diff --git a/prboom2/src/p_spec.c b/prboom2/src/p_spec.c index 363e28325..dbdb8a927 100644 --- a/prboom2/src/p_spec.c +++ b/prboom2/src/p_spec.c @@ -2938,6 +2938,7 @@ void T_Scroll(scroll_t *s) // non-floating, and clipped. thing->momx += dx; thing->momy += dy; + thing->intflags |= MIF_SCROLLING; } break; @@ -3446,6 +3447,7 @@ static dboolean PIT_PushThing(mobj_t* thing) pushangle >>= ANGLETOFINESHIFT; thing->momx += FixedMul(speed,finecosine[pushangle]); thing->momy += FixedMul(speed,finesine[pushangle]); + thing->intflags |= MIF_SCROLLING; } } return true; @@ -3575,6 +3577,7 @@ void T_Pusher(pusher_t *p) } thing->momx += xspeed<<(FRACBITS-PUSH_FACTOR); thing->momy += yspeed<<(FRACBITS-PUSH_FACTOR); + thing->intflags |= MIF_SCROLLING; } }