mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-12-18 16:31:50 +00:00
- fixed: Terrain splashes could be generated for 3D floors that were below the sector's actual floor.
This commit is contained in:
parent
9dd458030e
commit
a0d66be6e9
1 changed files with 14 additions and 6 deletions
|
@ -302,12 +302,16 @@ void FTraceInfo::Setup3DFloors()
|
||||||
if (rover->flags&FF_SWIMMABLE && Results->Crossed3DWater == NULL)
|
if (rover->flags&FF_SWIMMABLE && Results->Crossed3DWater == NULL)
|
||||||
{
|
{
|
||||||
if (Check3DFloorPlane(rover, false))
|
if (Check3DFloorPlane(rover, false))
|
||||||
|
{
|
||||||
|
// only consider if the plane is above the actual floor.
|
||||||
|
if (rover->top.plane->ZatPoint(Results->HitPos) > bf)
|
||||||
{
|
{
|
||||||
Results->Crossed3DWater = rover;
|
Results->Crossed3DWater = rover;
|
||||||
Results->Crossed3DWaterPos = Results->HitPos;
|
Results->Crossed3DWaterPos = Results->HitPos;
|
||||||
Results->Distance = 0;
|
Results->Distance = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!(rover->flags&FF_SHOOTTHROUGH))
|
if (!(rover->flags&FF_SHOOTTHROUGH))
|
||||||
{
|
{
|
||||||
|
@ -765,6 +769,9 @@ bool FTraceInfo::TraceTraverse (int ptflags)
|
||||||
if ((rover->flags & FF_EXISTS) && (rover->flags&FF_SWIMMABLE))
|
if ((rover->flags & FF_EXISTS) && (rover->flags&FF_SWIMMABLE))
|
||||||
{
|
{
|
||||||
if (Check3DFloorPlane(rover, false))
|
if (Check3DFloorPlane(rover, false))
|
||||||
|
{
|
||||||
|
// only consider if the plane is above the actual floor.
|
||||||
|
if (rover->top.plane->ZatPoint(Results->HitPos) > CurSector->floorplane.ZatPoint(Results->HitPos))
|
||||||
{
|
{
|
||||||
Results->Crossed3DWater = rover;
|
Results->Crossed3DWater = rover;
|
||||||
Results->Crossed3DWaterPos = Results->HitPos;
|
Results->Crossed3DWaterPos = Results->HitPos;
|
||||||
|
@ -772,6 +779,7 @@ bool FTraceInfo::TraceTraverse (int ptflags)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
lastsplashsector = CurSector->sectornum;
|
lastsplashsector = CurSector->sectornum;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue