From ab2619d5386336044b1d13e0f9785d7ad4f808ba Mon Sep 17 00:00:00 2001
From: Nev3r <apophycens@gmail.com>
Date: Sun, 12 Apr 2020 13:04:15 +0200
Subject: [PATCH] Wrap P_FindSectorFromLineTag() is now a wrapper for
 P_FindSectorFromTag().

---
 src/p_spec.c | 18 +-----------------
 1 file changed, 1 insertion(+), 17 deletions(-)

diff --git a/src/p_spec.c b/src/p_spec.c
index cf4ab3da37..529c50e4d8 100644
--- a/src/p_spec.c
+++ b/src/p_spec.c
@@ -998,23 +998,7 @@ static sector_t *P_FindModelCeilingSector(fixed_t ceildestheight, INT32 secnum)
   */
 INT32 P_FindSectorFromLineTag(line_t *line, INT32 start)
 {
-	if (line->tag == -1)
-	{
-		start++;
-
-		if (start >= (INT32)numsectors)
-			return -1;
-
-		return start;
-	}
-	else
-	{
-		start = start >= 0 ? sectors[start].nexttag :
-			sectors[(unsigned)line->tag % numsectors].firsttag;
-		while (start >= 0 && sectors[start].tag != line->tag)
-			start = sectors[start].nexttag;
-		return start;
-	}
+	return P_FindSectorFromTag(line->tag, start);
 }
 
 /** Searches the tag lists for the next sector with a given tag.
-- 
GitLab