- Fixed coordinate checks for objects on 3DMidtex lines.

SVN r978 (trunk)
This commit is contained in:
Christoph Oelckers 2008-05-17 17:57:50 +00:00
parent 9fcb85d3e9
commit 7949f6d35f
3 changed files with 22 additions and 3 deletions

View File

@ -1,4 +1,5 @@
May 17, 2008 (Changes by Graf Zahl)
- Fixed coordinate checks for objects on 3DMidtex lines.
- Fixed: All translucent blending operations for CopyColors must treat an
alpha of 0 so that the pixel is not modified or texture composition as
intended will not work.

View File

@ -150,6 +150,10 @@ static bool PIT_FindFloorCeiling (line_t *ld, const FBoundingBox &box, FCheckPos
tmf.floorsector = open.bottomsec;
tmf.touchmidtex = open.touchmidtex;
}
else if (open.bottom == tmf.floorz)
{
tmf.touchmidtex |= open.touchmidtex;
}
if (open.lowfloor < tmf.dropoffz)
tmf.dropoffz = open.lowfloor;
@ -194,7 +198,7 @@ void P_FindFloorCeiling (AActor *actor, bool onlymidtex)
if (tmf.touchmidtex) tmf.dropoffz = tmf.floorz;
if (!onlymidtex || (tmf.touchmidtex && (tmf.floorz < actor->z)))
if (!onlymidtex || (tmf.touchmidtex && (tmf.floorz <= actor->z)))
{
actor->floorz = tmf.floorz;
actor->dropoffz = tmf.dropoffz;
@ -629,6 +633,10 @@ bool PIT_CheckLine (line_t *ld, const FBoundingBox &box, FCheckPosition &tm)
tm.touchmidtex = open.touchmidtex;
tm.thing->BlockingLine = ld;
}
else if (open.bottom == tm.floorz)
{
tm.touchmidtex |= open.touchmidtex;
}
if (open.lowfloor < tm.dropoffz)
tm.dropoffz = open.lowfloor;
@ -1133,7 +1141,11 @@ bool P_CheckPosition (AActor *thing, fixed_t x, fixed_t y, FCheckPosition &tm)
if (tm.ceilingz - tm.floorz < thing->height)
return false;
if (tm.stepthing != NULL || tm.touchmidtex)
if (tm.touchmidtex)
{
tm.dropoffz = tm.floorz;
}
else if (tm.stepthing != NULL)
{
tm.dropoffz = thingdropoffz;
}

View File

@ -1758,7 +1758,12 @@ explode:
|| mo->momy > FRACUNIT/4 || mo->momy < -FRACUNIT/4)
{
if (mo->floorz > mo->Sector->floorplane.ZatPoint (mo->x, mo->y))
return;
{
if (mo->dropoffz != mo->floorz) // 3DMidtex or other special cases that must be excluded
{
return;
}
}
}
}
@ -4029,6 +4034,7 @@ AActor *P_SpawnMapThing (FMapThing *mthing, int position)
mobj->SpawnPoint[2] = mthing->z;
mobj->SpawnAngle = mthing->angle;
mobj->SpawnFlags = mthing->flags;
P_FindFloorCeiling(mobj, true);
if (!(mobj->flags2 & MF2_ARGSDEFINED))
{