mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-11 07:11:54 +00:00
- Fixed: Polyobjects must be blocking where an object is below the reference sector floor or above the reference sector ceiling.
- Fixed: 3DMidTexture polyobjects had open.top and open.bottom reversed. SVN r3633 (trunk)
This commit is contained in:
parent
898232be61
commit
60dc67d5c3
1 changed files with 28 additions and 6 deletions
|
@ -1156,6 +1156,7 @@ bool FPolyObj::CheckMobjBlocking (side_t *sd)
|
||||||
int left, right, top, bottom;
|
int left, right, top, bottom;
|
||||||
line_t *ld;
|
line_t *ld;
|
||||||
bool blocked;
|
bool blocked;
|
||||||
|
bool performBlockingThrust;
|
||||||
|
|
||||||
ld = sd->linedef;
|
ld = sd->linedef;
|
||||||
|
|
||||||
|
@ -1196,8 +1197,8 @@ bool FPolyObj::CheckMobjBlocking (side_t *sd)
|
||||||
if ((mobj->flags&MF_SOLID) && !(mobj->flags&MF_NOCLIP))
|
if ((mobj->flags&MF_SOLID) && !(mobj->flags&MF_NOCLIP))
|
||||||
{
|
{
|
||||||
FLineOpening open;
|
FLineOpening open;
|
||||||
open.top = -INT_MAX;
|
open.top = INT_MAX;
|
||||||
open.bottom = INT_MAX;
|
open.bottom = -INT_MAX;
|
||||||
// [TN] Check wether this actor gets blocked by the line.
|
// [TN] Check wether this actor gets blocked by the line.
|
||||||
if (ld->backsector != NULL &&
|
if (ld->backsector != NULL &&
|
||||||
!(ld->flags & (ML_BLOCKING|ML_BLOCKEVERYTHING))
|
!(ld->flags & (ML_BLOCKING|ML_BLOCKEVERYTHING))
|
||||||
|
@ -1206,11 +1207,18 @@ bool FPolyObj::CheckMobjBlocking (side_t *sd)
|
||||||
&& !((mobj->flags & MF_FLOAT) && (ld->flags & ML_BLOCK_FLOATERS))
|
&& !((mobj->flags & MF_FLOAT) && (ld->flags & ML_BLOCK_FLOATERS))
|
||||||
&& (!(ld->flags & ML_3DMIDTEX) ||
|
&& (!(ld->flags & ML_3DMIDTEX) ||
|
||||||
(!P_LineOpening_3dMidtex(mobj, ld, open) &&
|
(!P_LineOpening_3dMidtex(mobj, ld, open) &&
|
||||||
(mobj->z + mobj->height < open.bottom)
|
(mobj->z + mobj->height < open.top)
|
||||||
) || (open.abovemidtex && mobj->z > mobj->floorz))
|
) || (open.abovemidtex && mobj->z > mobj->floorz))
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
continue;
|
// [BL] We can't just continue here since we must
|
||||||
|
// determine if the line's backsector is going to
|
||||||
|
// be blocked.
|
||||||
|
performBlockingThrust = false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
performBlockingThrust = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
FBoundingBox box(mobj->x, mobj->y, mobj->radius);
|
FBoundingBox box(mobj->x, mobj->y, mobj->radius);
|
||||||
|
@ -1236,10 +1244,24 @@ bool FPolyObj::CheckMobjBlocking (side_t *sd)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
// [BL] See if we hit below the floor/ceiling of the poly.
|
||||||
|
else if(!performBlockingThrust && (
|
||||||
|
mobj->z < ld->sidedef[!side]->sector->GetSecPlane(sector_t::floor).ZatPoint(mobj->x, mobj->y) ||
|
||||||
|
mobj->z + mobj->height > ld->sidedef[!side]->sector->GetSecPlane(sector_t::ceiling).ZatPoint(mobj->x, mobj->y)
|
||||||
|
))
|
||||||
|
{
|
||||||
|
performBlockingThrust = true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(performBlockingThrust)
|
||||||
|
{
|
||||||
ThrustMobj (mobj, sd);
|
ThrustMobj (mobj, sd);
|
||||||
blocked = true;
|
blocked = true;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue