diff --git a/src/p_maputl.cpp b/src/p_maputl.cpp index 2835896f98..eee5167ce8 100644 --- a/src/p_maputl.cpp +++ b/src/p_maputl.cpp @@ -1398,7 +1398,7 @@ intercept_t *FPathTraverse::Next() // //=========================================================================== -FPathTraverse::FPathTraverse (fixed_t x1, fixed_t y1, fixed_t x2, fixed_t y2, int flags) +void FPathTraverse::init (fixed_t x1, fixed_t y1, fixed_t x2, fixed_t y2, int flags) { fixed_t xt1, xt2; fixed_t yt1, yt2; diff --git a/src/p_maputl.h b/src/p_maputl.h index 452f99b3d0..415d4b83bd 100644 --- a/src/p_maputl.h +++ b/src/p_maputl.h @@ -325,6 +325,7 @@ public: class FPathTraverse { +protected: static TArray intercepts; divline_t trace; @@ -332,14 +333,19 @@ class FPathTraverse unsigned int intercept_count; unsigned int count; - void AddLineIntercepts(int bx, int by); - void AddThingIntercepts(int bx, int by, FBlockThingsIterator &it, bool compatible); + virtual void AddLineIntercepts(int bx, int by); + virtual void AddThingIntercepts(int bx, int by, FBlockThingsIterator &it, bool compatible); + void init(fixed_t x1, fixed_t y1, fixed_t x2, fixed_t y2, int flags); + FPathTraverse() {} public: intercept_t *Next(); - FPathTraverse(fixed_t x1, fixed_t y1, fixed_t x2, fixed_t y2, int flags); - ~FPathTraverse(); + FPathTraverse(fixed_t x1, fixed_t y1, fixed_t x2, fixed_t y2, int flags) + { + init(x1, y1, x2, y2, flags); + } + virtual ~FPathTraverse(); const divline_t &Trace() const { return trace; } };