diff --git a/src/doomdata.h b/src/doomdata.h index 028ae55121..8592462611 100644 --- a/src/doomdata.h +++ b/src/doomdata.h @@ -139,7 +139,7 @@ enum ELineFlags ML_ADDTRANS = 0x00000400, // additive translucency (can only be set internally) // Extended flags - ML_MONSTERSCANACTIVATE = 0x00002000, // [RH] Monsters (as well as players) can active the line + ML_MONSTERSCANACTIVATE = 0x00002000, // [RH] Monsters (as well as players) can activate the line ML_BLOCK_PLAYERS = 0x00004000, ML_BLOCKEVERYTHING = 0x00008000, // [RH] Line blocks everything ML_ZONEBOUNDARY = 0x00010000, diff --git a/src/p_doors.cpp b/src/p_doors.cpp index 29ec1fc6b3..ccfd61c5d5 100644 --- a/src/p_doors.cpp +++ b/src/p_doors.cpp @@ -626,6 +626,17 @@ void DAnimatedDoor::Tick () MoveCeiling (2048*FRACUNIT, m_BotDist, -1); m_Sector->ceilingdata = NULL; Destroy (); + // Unset blocking flags on lines that didn't start with them. Since the + // ceiling is down now, we shouldn't need this flag anymore to keep things + // from getting through. + if (!m_SetBlocking1) + { + m_Line1->flags &= ~ML_BLOCKING; + } + if (!m_SetBlocking2) + { + m_Line2->flags &= ~ML_BLOCKING; + } break; } else @@ -668,6 +679,14 @@ void DAnimatedDoor::Serialize (FArchive &arc) << m_Speed << m_Delay << basetex; + if (SaveVersion < 2336) + { + m_SetBlocking1 = m_SetBlocking2 = true; + } + else + { + arc << m_SetBlocking1 << m_SetBlocking2; + } if (arc.IsLoading()) { @@ -727,6 +746,8 @@ DAnimatedDoor::DAnimatedDoor (sector_t *sec, line_t *line, int speed, int delay) m_Delay = delay; m_Timer = m_Speed; m_Frame = 0; + m_SetBlocking1 = !!(m_Line1->flags & ML_BLOCKING); + m_SetBlocking2 = !!(m_Line2->flags & ML_BLOCKING); m_Line1->flags |= ML_BLOCKING; m_Line2->flags |= ML_BLOCKING; m_BotDist = m_Sector->ceilingplane.d; diff --git a/src/p_map.cpp b/src/p_map.cpp index 9ff863e2b0..09d1f944af 100644 --- a/src/p_map.cpp +++ b/src/p_map.cpp @@ -620,16 +620,17 @@ bool PIT_CheckLine (line_t *ld, const FBoundingBox &box, FCheckPosition &tm) return false; } - // MBF bouncers are treated as missiles here. - bool Projectile = (tm.thing->flags & MF_MISSILE || tm.thing->BounceFlags & BOUNCE_MBF); - // MBF considers that friendly monsters are not blocked by monster-blocking lines. - // This is added here as a compatibility option. Note that monsters that are dehacked - // into being friendly with the MBF flag automatically gain MF3_NOBLOCKMONST, so this - // just optionally generalizes the behavior to other friendly monsters. - bool NotBlocked = ((tm.thing->flags3 & MF3_NOBLOCKMONST) - || ((i_compatflags & COMPATF_NOBLOCKFRIENDS) && (tm.thing->flags & MF_FRIENDLY))); + // MBF bouncers are treated as missiles here. + bool Projectile = (tm.thing->flags & MF_MISSILE || tm.thing->BounceFlags & BOUNCE_MBF); + // MBF considers that friendly monsters are not blocked by monster-blocking lines. + // This is added here as a compatibility option. Note that monsters that are dehacked + // into being friendly with the MBF flag automatically gain MF3_NOBLOCKMONST, so this + // just optionally generalizes the behavior to other friendly monsters. + bool NotBlocked = ((tm.thing->flags3 & MF3_NOBLOCKMONST) + || ((i_compatflags & COMPATF_NOBLOCKFRIENDS) && (tm.thing->flags & MF_FRIENDLY))); - if (!(Projectile) || (ld->flags & (ML_BLOCKEVERYTHING|ML_BLOCKPROJECTILE))) { + if (!(Projectile) || (ld->flags & (ML_BLOCKEVERYTHING|ML_BLOCKPROJECTILE))) + { if (ld->flags & ML_RAILING) { rail = true; diff --git a/src/p_spec.h b/src/p_spec.h index ca0d9492c5..ca3694c098 100644 --- a/src/p_spec.h +++ b/src/p_spec.h @@ -640,6 +640,7 @@ protected: }; int m_Speed; int m_Delay; + bool m_SetBlocking1, m_SetBlocking2; friend bool EV_SlidingDoor (line_t *line, AActor *thing, int tag, int speed, int delay); private: