- hm. I thouggr thia has been saved before committing.

This commit is contained in:
Christoph Oelckers 2016-03-01 01:53:09 +01:00
parent 2584108200
commit 5e7ecb3c44
3 changed files with 4 additions and 8 deletions

View File

@ -4760,12 +4760,8 @@ bool P_UseTraverse(AActor *usething, fixed_t startx, fixed_t starty, fixed_t end
if (P_PointOnLineSide(xpos.x, xpos.y, in->d.line) == 0) if (P_PointOnLineSide(xpos.x, xpos.y, in->d.line) == 0)
{ {
FLinePortal *port = in->d.line->getPortal(); FLinePortal *port = in->d.line->getPortal();
if (port->mType != PORTT_LINKED) // other types will cause problems with
{
return true;
}
// Also translate the player origin, so that we can use that for checks further below and in P_CheckSwitchRange // Also translate the player origin, so that we can use that for checks further below and in P_CheckSwitchRange
it.PortalRealign(in, PT_ADDLINES | PT_ADDTHINGS, &xpos); it.PortalRelocate(in, PT_ADDLINES | PT_ADDTHINGS, &xpos);
} }
continue; continue;

View File

@ -1611,11 +1611,11 @@ void FPathTraverse::init (fixed_t x1, fixed_t y1, fixed_t x2, fixed_t y2, int fl
//=========================================================================== //===========================================================================
// //
// // Relocates the trace when going through a line portal
// //
//=========================================================================== //===========================================================================
bool FPathTraverse::PortalRealign(intercept_t *in, int flags, fixedvec3 *optpos) bool FPathTraverse::PortalRelocate(intercept_t *in, int flags, fixedvec3 *optpos)
{ {
if (!in->isaline || !in->d.line->isLinePortal()) return false; if (!in->isaline || !in->d.line->isLinePortal()) return false;
fixed_t hitx = trace.x; fixed_t hitx = trace.x;

View File

@ -356,7 +356,7 @@ public:
init(x1, y1, x2, y2, flags); init(x1, y1, x2, y2, flags);
} }
void init(fixed_t x1, fixed_t y1, fixed_t x2, fixed_t y2, int flags, fixed_t startfrac = 0); void init(fixed_t x1, fixed_t y1, fixed_t x2, fixed_t y2, int flags, fixed_t startfrac = 0);
bool PortalRealign(intercept_t *in, int flags, fixedvec3 *optpos = NULL); bool PortalRelocate(intercept_t *in, int flags, fixedvec3 *optpos = NULL);
virtual ~FPathTraverse(); virtual ~FPathTraverse();
const divline_t &Trace() const { return trace; } const divline_t &Trace() const { return trace; }
}; };