mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-11 07:12:16 +00:00
- fixed: Trace should set CrossedWater only if a water surface actually is crossed, i.e. the start of the trace and the end of the trace are on different sides of the surface.
This was incorrectly spawning splashes when shooting inside a deep water sector, but in most cases the splash just was not visible. It could become visible if its position got clipped by a nearby one-sided wall.
This commit is contained in:
parent
82bc5e7bd1
commit
f1597a5d26
1 changed files with 2 additions and 1 deletions
|
@ -434,7 +434,7 @@ bool FTraceInfo::LineCheck(intercept_t *in, double dist, DVector3 hit)
|
|||
sector_t *hsec = CurSector->GetHeightSec();
|
||||
if (Results->CrossedWater == NULL &&
|
||||
hsec != NULL &&
|
||||
//CurSector->heightsec->waterzone &&
|
||||
Start.Z > hsec->floorplane.ZatPoint(Start) &&
|
||||
hit.Z <= hsec->floorplane.ZatPoint(hit))
|
||||
{
|
||||
// hit crossed a water plane
|
||||
|
@ -846,6 +846,7 @@ bool FTraceInfo::TraceTraverse (int ptflags)
|
|||
|
||||
if (Results->CrossedWater == NULL &&
|
||||
CurSector->heightsec != NULL &&
|
||||
CurSector->heightsec->floorplane.ZatPoint(Start) < Start.Z &&
|
||||
CurSector->heightsec->floorplane.ZatPoint(Results->HitPos) >= Results->HitPos.Z)
|
||||
{
|
||||
// Save the result so that the water check doesn't destroy it.
|
||||
|
|
Loading…
Reference in a new issue