diff --git a/src/deh_tables.c b/src/deh_tables.c index a96adf8ae..9fd00e0c3 100644 --- a/src/deh_tables.c +++ b/src/deh_tables.c @@ -4384,6 +4384,7 @@ const char *const MOBJFLAG_LIST[] = { "NOCLIPTHING", "GRENADEBOUNCE", "RUNSPAWNFUNC", + "NOSTEPUP", NULL }; diff --git a/src/info.c b/src/info.c index 3998eb88d..20d6b8338 100644 --- a/src/info.c +++ b/src/info.c @@ -4469,7 +4469,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = 100, // mass 0, // damage sfx_None, // activesound - MF_ENEMY|MF_SPECIAL|MF_NOGRAVITY|MF_SHOOTABLE, // flags + MF_ENEMY|MF_SPECIAL|MF_NOGRAVITY|MF_SHOOTABLE|MF_NOSTEPUP, // flags (statenum_t)MT_MINE// raisestate }, diff --git a/src/p_map.c b/src/p_map.c index 337344b2f..81e5aeec5 100644 --- a/src/p_map.c +++ b/src/p_map.c @@ -2748,7 +2748,7 @@ increment_move maxstep = 0; } - if (thing->type == MT_SKIM) + if (thing->flags & MF_NOSTEPUP) maxstep = 0; if (tmceilingz - tmfloorz < thing->height diff --git a/src/p_mobj.c b/src/p_mobj.c index 259bf19d4..9d8b18f65 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -10486,10 +10486,13 @@ void P_SceneryThinker(mobj_t *mobj) P_CheckPosition(mobj, mobj->x, mobj->y); // Need this to pick up objects! if (P_MobjWasRemoved(mobj)) return; - mobj->floorz = tmfloorz; - mobj->ceilingz = tmceilingz; - mobj->floorrover = tmfloorrover; - mobj->ceilingrover = tmceilingrover; + if (!(mobj->flags & MF_NOSTEPUP)) + { + mobj->floorz = tmfloorz; + mobj->ceilingz = tmceilingz; + mobj->floorrover = tmfloorrover; + mobj->ceilingrover = tmceilingrover; + } } else { diff --git a/src/p_mobj.h b/src/p_mobj.h index 4a8427669..7864ec563 100644 --- a/src/p_mobj.h +++ b/src/p_mobj.h @@ -87,7 +87,7 @@ // block or has the MF_NOBLOCKMAP flag set. // Links should only be modified by the P_[Un]SetThingPosition() // functions. -// Do not change the MF_NO? flags while a thing is valid. +// Do not change the MF_NO? flags while a thing is valid with the exception of the MF_NOSTEPUP flag. // // Any questions? // @@ -159,7 +159,9 @@ typedef enum MF_GRENADEBOUNCE = 1<<28, // Run the action thinker on spawn. MF_RUNSPAWNFUNC = 1<<29, - // free: 1<<30 and 1<<31 + // Don't allow the mobj to be affected by the stepup code. + MF_NOSTEPUP = 1<<30, + // free: to and including 1<<31 } mobjflag_t; typedef enum