diff --git a/src/p_linetracedata.h b/src/p_linetracedata.h index f6191b5d1..b05b694d5 100644 --- a/src/p_linetracedata.h +++ b/src/p_linetracedata.h @@ -14,6 +14,7 @@ struct FLineTraceData F3DFloor *Hit3DFloor; FTextureID HitTexture; DVector3 HitLocation; + DVector3 HitDir; double Distance; int NumPortals; int LineSide; diff --git a/src/p_map.cpp b/src/p_map.cpp index 6ead821ba..50397d852 100644 --- a/src/p_map.cpp +++ b/src/p_map.cpp @@ -4902,6 +4902,7 @@ bool P_LineTrace(AActor *t1, DAngle angle, double distance, outdata->HitLine = trace.Line; outdata->HitSector = trace.Sector; outdata->Hit3DFloor = trace.ffloor; + outdata->SectorPlane = (trace.HitType == TRACE_HitCeiling) ? 1 : 0; if ( trace.HitType == TRACE_HitWall ) { outdata->LineSide = trace.Side; @@ -4928,6 +4929,7 @@ bool P_LineTrace(AActor *t1, DAngle angle, double distance, } else outdata->HitTexture = trace.HitTexture; outdata->HitLocation = trace.HitPos; + outdata->HitDir = trace.HitVector; outdata->Distance = trace.Distance; outdata->NumPortals = TData.NumPortals; outdata->HitType = trace.HitType; diff --git a/wadsrc/static/zscript/actor.txt b/wadsrc/static/zscript/actor.txt index cb2ceb945..a7f76f348 100644 --- a/wadsrc/static/zscript/actor.txt +++ b/wadsrc/static/zscript/actor.txt @@ -47,6 +47,7 @@ struct FLineTraceData F3DFloor Hit3DFloor; TextureID HitTexture; Vector3 HitLocation; + Vector3 HitDir; double Distance; int NumPortals; int LineSide;