- fixed: FPathTraverse::init kills the intercepts array so PortalRelocate needs to store the line before calling that function.

This commit is contained in:
Christoph Oelckers 2016-03-08 18:45:52 +01:00
parent 42521ffd6f
commit 0a1e22aa7a

View file

@ -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;
}
//===========================================================================