diff --git a/src/p_map.c b/src/p_map.c index 8227e6225..3aaf7d78b 100644 --- a/src/p_map.c +++ b/src/p_map.c @@ -1879,6 +1879,8 @@ boolean P_CheckPosition(mobj_t *thing, fixed_t x, fixed_t y, TryMoveResult_t *re } } + P_ClearTestLines(); + // The bounding box is extended by MAXRADIUS // because mobj_ts are grouped into mapblocks // based on their origin point, and can overlap @@ -2008,8 +2010,6 @@ boolean P_CheckPosition(mobj_t *thing, fixed_t x, fixed_t y, TryMoveResult_t *re validcount++; - P_ClearTestLines(); - // check lines for (bx = xl; bx <= xh; bx++) { diff --git a/src/p_polyobj.c b/src/p_polyobj.c index da7aad6bb..f8e389c8d 100644 --- a/src/p_polyobj.c +++ b/src/p_polyobj.c @@ -200,6 +200,10 @@ boolean P_BBoxInsidePolyobj(polyobj_t *po, fixed_t *bbox) { if (P_BoxOnLineSide(bbox, po->lines[i]) == 0) return false; + if (tm.sweep) + { + P_TestLine(po->lines[i]); + } } return true;