From 203aa0602e458095b344664e437db894bfca373f Mon Sep 17 00:00:00 2001 From: Sryder Date: Sun, 22 Mar 2020 00:25:48 +0000 Subject: [PATCH] Use P_FindSpecialLineFromTag for MT_WAYPOINT, now that it works where we need it This matches how MT_SPINMACEPOINT was changed --- src/p_mobj.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/p_mobj.c b/src/p_mobj.c index cdfe8fcb1..7259f46f2 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -12072,16 +12072,11 @@ ML_NOCLIMB : Direction not controllable break; case MT_WAYPOINT: { - size_t line; + // Just like MT_SPINMACEPOINT, this now works here too! + INT32 line = P_FindSpecialLineFromTag(9, mthing->angle, -1); mobj->radius = 384*FRACUNIT; - // Same reason as for MT_SPINMACEPOINT we can't use the function to find the linedef - for (line = 0; line < numlines; line++) - { - if (lines[line].special == 2000 && lines[line].tag == mthing->angle) - break; - } // Set the radius, mobj z, and mthing z to match what the parameters want - if (line < numlines) + if (line != -1) { fixed_t lineradius = sides[lines[line].sidenum[0]].textureoffset; fixed_t linez = sides[lines[line].sidenum[0]].rowoffset;