From 2628dabc314c4c00f29c14833f1f3fe09d56bec2 Mon Sep 17 00:00:00 2001 From: Marisa Kirisame Date: Sat, 14 Sep 2019 23:25:17 +0200 Subject: [PATCH] Fix for LineTrace not setting its starting sector based on its offset. --- src/playsim/p_map.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/playsim/p_map.cpp b/src/playsim/p_map.cpp index 6f7165b4c..a60b40b1a 100644 --- a/src/playsim/p_map.cpp +++ b/src/playsim/p_map.cpp @@ -4803,7 +4803,7 @@ int P_LineTrace(AActor *t1, DAngle angle, double distance, if ( flags & TRF_NOSKY ) tflags |= TRACE_NoSky; // Do trace - bool ret = Trace(startpos, t1->Sector, direction, distance, aflags, lflags, t1, trace, tflags, CheckLineTrace, &TData); + bool ret = Trace(startpos, t1->Level->PointInSector(startpos), direction, distance, aflags, lflags, t1, trace, tflags, CheckLineTrace, &TData); if ( outdata ) { memset(outdata,0,sizeof(*outdata));