mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2025-01-31 04:20:34 +00:00
- Fixed: Animated doors should only leave ML_BLOCKING set if the door was created with it set.
Otherwise, monsters will be unable to open it after it has been used once if it isn't set for push activation. SVN r2336 (trunk)
This commit is contained in:
parent
61d2a808d7
commit
709414e606
4 changed files with 33 additions and 10 deletions
|
@ -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,
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue