diff --git a/src/p_local.h b/src/p_local.h index e8cc5fde0..859722912 100644 --- a/src/p_local.h +++ b/src/p_local.h @@ -380,7 +380,6 @@ class FPathTraverse divline_t trace; unsigned int intercept_index; unsigned int intercept_count; - fixed_t maxfrac; unsigned int count; void AddLineIntercepts(int bx, int by); diff --git a/src/p_maputl.cpp b/src/p_maputl.cpp index 1d806d044..85e9183c5 100644 --- a/src/p_maputl.cpp +++ b/src/p_maputl.cpp @@ -985,7 +985,7 @@ void FPathTraverse::AddLineIntercepts(int bx, int by) P_MakeDivline (ld, &dl); frac = P_InterceptVector (&trace, &dl); - if (frac < 0) continue; // behind source + if (frac < 0 || frac > 1) continue; // behind source or beyond end point intercept_t newintercept; @@ -1170,7 +1170,7 @@ intercept_t *FPathTraverse::Next() } } - if (dist > maxfrac || in == NULL) return NULL; // checked everything in range + if (dist > FRACUNIT || in == NULL) return NULL; // checked everything in range in->done = true; return in; } @@ -1388,7 +1388,6 @@ FPathTraverse::FPathTraverse (fixed_t x1, fixed_t y1, fixed_t x2, fixed_t y2, in break; } } - maxfrac = FRACUNIT; } FPathTraverse::~FPathTraverse()