From 0a1e22aa7a5b10b651252f9da728e618b688edd9 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 8 Mar 2016 18:45:52 +0100 Subject: [PATCH] - fixed: FPathTraverse::init kills the intercepts array so PortalRelocate needs to store the line before calling that function. --- src/p_maputl.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/p_maputl.cpp b/src/p_maputl.cpp index b9d682e6e..55ce03470 100644 --- a/src/p_maputl.cpp +++ b/src/p_maputl.cpp @@ -1677,9 +1677,10 @@ int FPathTraverse::PortalRelocate(intercept_t *in, int flags, fixedvec3 *optpos) P_TranslatePortalXY(in->d.line, optpos->x, optpos->y); P_TranslatePortalZ(in->d.line, optpos->z); } + line_t *saved = in->d.line; // this gets overwriitten by the init call. intercepts.Resize(intercept_index); init(hitx, hity, endx, endy, flags, in->frac); - return in->d.line->getPortal()->mType == PORTT_LINKED? 1:-1; + return saved->getPortal()->mType == PORTT_LINKED? 1:-1; } //===========================================================================