From ed7b7fc0ba1f05c08e47cfff6eccb28249917f47 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 6 Feb 2016 00:21:44 +0100 Subject: [PATCH] - fixed: The backlink portal for EE-style definition needs to be done along with the first portal because the code won't find the anchor line itself. --- src/portal.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/portal.cpp b/src/portal.cpp index b49eb0d3a..79d0a5f7d 100644 --- a/src/portal.cpp +++ b/src/portal.cpp @@ -85,6 +85,18 @@ void P_SpawnLinePortal(line_t* line) port->mType = PORTT_LINKED; port->mAlign = PORG_ABSOLUTE; port->mDefFlags = PORTF_TYPEINTERACTIVE; + + // we need to create the backlink here, too. + lines[i].portalindex = linePortals.Reserve(1); + port = &linePortals.Last(); + + memset(port, 0, sizeof(FLinePortal)); + port->mOrigin = &lines[i]; + port->mDestination = line; + port->mType = PORTT_LINKED; + port->mAlign = PORG_ABSOLUTE; + port->mDefFlags = PORTF_TYPEINTERACTIVE; + } } }